Fix/room renaming #6
Workflow file for this run
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: main | |
on: | |
pull_request: | |
branches: | |
- main | |
push: | |
branches: | |
- main | |
jobs: | |
buildAndUpload: | |
container: | |
image: node:20 | |
if: ${{ github.event_name == 'pull_request' }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Cache local downloads | |
uses: actions/cache@v4 | |
with: | |
path: /github/home/.npm | |
key: ${{ runner.os }}-npm-packages | |
- name: Install buildtime dependencies | |
run: npm ci | |
- name: Lint | |
run: npx eslint | |
- name: Lint | |
run: npm test | |
- name: Compile | |
run: npm run build | |
- name: Upload static files as artifact | |
id: deployment | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: ./build | |
deploy: | |
container: | |
image: node:20 | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
if: ${{ github.event_name == 'push' || github.event.pull_request.merged == true }} | |
needs: buildAndUpload | |
permissions: | |
pages: write | |
id-token: write | |
runs-on: ubuntu-latest | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |