Skip to content

Add What's New/Digest Functionality & Storage Updates #127

Add What's New/Digest Functionality & Storage Updates

Add What's New/Digest Functionality & Storage Updates #127

Workflow file for this run

name: Build Website
on:
push:
branches: [ 'main' ]
pull_request:
branches: [ 'main' ]
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
env:
SITE_URL: https://sycl.tech/
CONTENT_URL: https://feeds.sycl.tech
jobs:
# Generates a series of routes that Angular can then use to pre-render
generate-routes:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
- name: Set up Python 3.11
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d
with:
python-version: '3.11'
cache: 'pip'
- name: Install Dependencies
run: pip install -r ./scripts/routes/requirements.txt --require-hashes --no-deps
- name: Inject Generated Routes
run: python ./scripts/routes/generate.py "$CONTENT_URL" >> routes.txt
- name: Inject Legacy Routes
run: cat legacy-routes.txt >> routes.txt
- name: Upload to GitHub Artifacts
uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b
with:
name: routes
path: routes.txt
# Build the Angular site
build:
needs: generate-routes
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16
with:
name: routes
merge-multiple: true
- 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: Upload to GitHub Artifacts
uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa
with:
path: ./dist/sycl.tech-front-end/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