Small bugfixes #22
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: Build Website | |
on: | |
push: | |
branches: [ 'main' ] | |
pull_request: | |
branches: [ 'main' ] | |
workflow_dispatch: | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
env: | |
SITE_URL: /openssf-dashboard/ | |
jobs: | |
# Build the Angular site | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 | |
- run: ls -a | |
- name: Setup Node.js 22 | |
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 | |
with: | |
node-version: 22.4.1 | |
cache: 'npm' | |
- name: Install Dependencies | |
run: npm ci | |
- name: Build | |
run: npm run build -- --base-href "$SITE_URL" --configuration=production | |
- name: Copy index.html to 404.html | |
run: cp ./dist/openssf-dashboard/browser/index.html ./dist/openssf-dashboard/browser/404.html | |
- name: Upload to GitHub Artifacts | |
uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa | |
with: | |
path: ./dist/openssf-dashboard/browser | |
# Deployment the site to GitHub Pages | |
deploy: | |
if: (github.event_name == 'push' && github.ref_name == 'main') || github.event_name == 'workflow_dispatch' | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e |