Add pbgv103's content (#134) #104
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: Deploy channel | |
on: | |
workflow_dispatch: # | |
workflow_call: # | |
push: | |
paths: | |
- 'src/yaml/**' | |
branches: | |
- main | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. | |
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. | |
concurrency: | |
group: "pages" | |
cancel-in-progress: false | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
ref: main | |
persist-credentials: false | |
submodules: recursive | |
- name: Build channel and website | |
uses: memo33/sc4pac-actions/actions/build@main | |
with: | |
path: src/yaml | |
pages-output-path: 'tmp_gh-pages' | |
channel-label: ${{ vars.CHANNEL_LABEL }} | |
metadata-source-url: ${{ format('https://github.com/{0}/blob/{1}/{2}/', github.repository, github.event.repository.default_branch, 'src/yaml') }} | |
- name: Move channel content to root | |
run: | | |
mv tmp_gh-pages/channel/* tmp_gh-pages/ | |
rmdir tmp_gh-pages/channel | |
- name: Setup Pages | |
uses: actions/configure-pages@v4 | |
- name: Upload artifact | |
# note that this action dereferences our `latest` symlinks, but that's not a huge problem, it just duplicates each json file (could maybe be avoided by using tar) | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: 'tmp_gh-pages' | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 | |
permissions: | |
pages: write | |
id-token: write |