Remove CRON job since workflow will now be triggered by webhook #96
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Continuous Deployment | |
| on: | |
| push: | |
| branches: [master] | |
| workflow_dispatch: | |
| jobs: | |
| # Build | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Repo | |
| uses: actions/checkout@v2 | |
| - name: Setup Node.js environment | |
| uses: actions/[email protected] | |
| - name: Clean Install Packages | |
| run: yarn cache clean && yarn install | |
| - name: Clean Gatsby Cache | |
| run: yarn clean | |
| - name: Build Gatsby Site | |
| run: yarn build | |
| env: | |
| CONTENTFUL_ACCESS_TOKEN: ${{ secrets.CONTENTFUL_ACCESS_TOKEN }} | |
| - name: Upload GitHub Pages artifact | |
| uses: actions/[email protected] | |
| with: | |
| name: webpage | |
| path: public | |
| # Deploy | |
| deploy: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Download a Build Artifact | |
| uses: actions/[email protected] | |
| with: | |
| name: webpage | |
| path: public | |
| - name: Push to GitHub Pages branch | |
| uses: ftnext/[email protected] | |
| with: | |
| build_dir: public | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |