Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@LarsBergqvist
Last active July 28, 2021 15:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save LarsBergqvist/46e5b9c186bc766dad8121e5ceddc7ab to your computer and use it in GitHub Desktop.
Save LarsBergqvist/46e5b9c186bc766dad8121e5ceddc7ab to your computer and use it in GitHub Desktop.
name: Continuous Deployment
on:
push:
branches: ['**']
jobs:
test-and-build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup node
uses: actions/setup-node@v2
with:
node-version: '14'
cache: 'yarn'
- name: Install packages
run: yarn install
- name: Run tests
run: yarn test
- name: Build for GitHub pages
run: |
yarn build-gh-pages
cp dist/gh-actions-example/index.html dist/gh-actions-example/404.html
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: build-artifacts
path: dist/gh-actions-example
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment