Create 2024-06-20-performance-portability-training-series.md #20
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: Generate JSON Feeds | |
on: | |
push: | |
branches: [ 'main' ] | |
pull_request: | |
branches: [ 'main' ] | |
workflow_dispatch: | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
jobs: | |
# Build job | |
build: | |
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 requirements.txt --require-hashes --no-deps | |
- name: Generate Feeds | |
run: | | |
# Generate the JSON Feeds | |
python feed.py \ | |
-s "${{ vars.CI_PAGES_URL }}" \ | |
-a "${{ vars.CI_PAGES_URL }}/static/" \ | |
-b "${{ vars.CI_PAGES_URL }}/feed" \ | |
-g "${{ secrets.FRONT_END_REBUILD_TOKEN }}" | |
- name: Copy Generate Feeds | |
run: | | |
cp -R html/. static feed/ | |
- name: Upload Feeds as Artifacts | |
uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa | |
with: | |
path: ./feed | |
# Deployment job | |
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 | |
# Trigger the front-end to rebuild | |
rebuild-frontend: | |
needs: deploy | |
runs-on: ubuntu-latest | |
steps: | |
- name: Build Front-End | |
uses: convictional/trigger-workflow-and-wait@924e4984551efec603bec665c0663332498c381a | |
with: | |
owner: codeplaysoftware | |
repo: sycl.tech-website | |
github_token: ${{ secrets.FRONT_END_REBUILD_TOKEN }} | |
workflow_file_name: build.yml |