Merge branch 'main' of https://github.com/blairlierman/board-game-web… #12
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: Build and Deploy to GitHub Pages | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
# Build job | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
node-version: '16' | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '16' | |
- uses: nrwl/nx-set-shas@v3 | |
- run: npm ci --legacy-peer-deps | |
# - run: npx nx workspace-lint | |
# - run: npx nx format:check | |
# - run: npx nx affected --target=lint --parallel=3 | |
# - run: npx nx affected --target=test --parallel=3 --ci --code-coverage | |
- run: npx nx build sff-tracker --parallel=3 --base-href="/sff-tracker/" | |
- name: Upload GitHub Pages artifact | |
uses: actions/upload-pages-artifact@v1.0.4 | |
with: | |
# Path of the directory containing the static assets. | |
path: dist/apps | |
# Deploy job | |
deploy: | |
# Add a dependency to the build job | |
needs: build | |
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment | |
permissions: | |
pages: write # to deploy to Pages | |
id-token: write # to verify the deployment originates from an appropriate source | |
# Deploy to the github-pages environment | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
# Specify runner + deployment step | |
runs-on: ubuntu-latest | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v1 |