diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml new file mode 100644 index 0000000..5d27ecd --- /dev/null +++ b/.github/workflows/gh-pages.yml @@ -0,0 +1,40 @@ +name: github pages + +on: + workflow_dispatch: + push: + branches: + - webpack + +jobs: + deploy: + runs-on: ubuntu-18.04 + steps: + - uses: actions/checkout@v2 + - name: Setup Node + uses: actions/setup-node@v2-beta + with: + node-version: '14.x' + + - name: Get yarn cache + id: yarn-cache + run: echo "::set-output name=dir::$(yarn cache dir)" + + - name: Cache dependencies + uses: actions/cache@v2 + with: + path: ${{ steps.yarn-cache.outputs.dir }} + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn- + - run: yarn install --frozen-lockfile + - run: yarn build + + - name: Deploy GH-Pages + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./dist + allow_empty_commit: true + keep_files: false + force_orphan: true \ No newline at end of file diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index ae3a5c8..0000000 --- a/.travis.yml +++ /dev/null @@ -1,20 +0,0 @@ -language: node_js -node_js: - - "stable" -cache: - yarn: true - directories: - - node_modules -script: - - yarn install - - yarn build -deploy: - provider: pages - verbose: true - skip_cleanup: true - github_token: $GITHUB_TOKEN - local_dir: dist - keep-history: false - target-branch: gh-pages - on: - branch: webpack diff --git a/README.md b/README.md index d28cc2a..1629dbb 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,6 @@ ## Automatic Build -[![Build Status](https://travis-ci.org/youthradio/NeverAgain-Front.svg?branch=webpack)](https://travis-ci.org/youthradio/NeverAgain-Front) - 1. If the build status is green passing, then a final static build with the website is pushed to [gh-pages](https://github.com/youthradio/NeverAgain-Front/tree/gh-pages) 1. Every new push, via github desktop or via github web is hooked up with [travis-ci](https://travis-ci.org/youthradio/NeverAgain-Front).