Last active
July 28, 2021 15:11
-
-
Save LarsBergqvist/46e5b9c186bc766dad8121e5ceddc7ab to your computer and use it in GitHub Desktop.
This file contains 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: ['**'] | |
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