Publish to GitHub Pages #95
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: Publish to GitHub Pages | |
on: [push, workflow_dispatch] | |
permissions: | |
packages: read | |
contents: read | |
pages: write | |
id-token: write | |
jobs: | |
build: | |
runs-on: [self-hosted, ubuntu-latest, x64, linux] | |
environment: actions | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: '8.2' | |
tools: composer:2.x | |
- name: Composer Install | |
run: composer install | |
- name: Compile Satis pages | |
run: vendor/bin/satis build satis.json ./dist | |
env: | |
COMPOSER_AUTH: '{"github-oauth": {"github.com": "${{ secrets.BOT_TOKEN }}"} }' | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v1 | |
with: | |
path: ./dist | |
publish: | |
runs-on: [self-hosted, ubuntu-latest, x64, linux] | |
needs: build | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v1 | |