Skip to content

Publish to GitHub Pages #193

Publish to GitHub Pages

Publish to GitHub Pages #193

Workflow file for this run

name: Publish to GitHub Pages
on:
push:
workflow_dispatch:
inputs:
repo_name:
description: 'Repository Name'
required: true
type: string
origin_url:
description: 'Origin Action URL'
required: true
type: string
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: Print dispatch event information
run: |
if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
echo "Triggered by repository: ${{ github.event.inputs.repo_name }}"
echo "Origin action URL: ${{ github.event.inputs.origin_url }}"
else
echo "self-dispatched"
fi
- 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