Skip to content

Continuous Deployment #81

Continuous Deployment

Continuous Deployment #81

Workflow file for this run

name: Continuous Deployment
on:
push:
branches: [master]
schedule:
- cron: '0 0 1 DEC,MAR,JUN,SEP *'
workflow_dispatch:
jobs:
# Build
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v2
- name: Setup Node.js environment
uses: actions/setup-node@v2.1.2
- 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 Artifact
uses: actions/upload-artifact@v2.2.3
with:
path: public
name: artifact
# Deploy
deploy:
needs: [build]
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v2
- name: Download Artifact
uses: actions/download-artifact@v2.0.9
- name: Deploy to GitHub Pages
uses: rdarida/simple-github-pages-deploy-action@v1
with:
git-base-folder: artifact
commit-message: Auto build static site