Skip to content

Continuous Deployment #99

Continuous Deployment

Continuous Deployment #99

Workflow file for this run

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 }}