Skip to content

refactor: move to github actions to build site #1

refactor: move to github actions to build site

refactor: move to github actions to build site #1

Workflow file for this run

name: Build Site
on:
push:
branches: ['sources', 'generator']
pull_request:
branches: ['sources', 'generator']
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
ref: sources

Check failure on line 15 in .github/workflows/build.yml

View workflow run for this annotation

GitHub Actions / Build Site

Invalid workflow file

The workflow is not valid. .github/workflows/build.yml (Line: 15, Col: 9): Unexpected value 'ref' .github/workflows/build.yml (Line: 16, Col: 9): Unexpected value 'path'
path: sources
- uses: actions/checkout@v4
ref: generator
path: generator
- name: Copy files
run: |
cp -a generator/webroot workdir
cp -a sources/{post,content.php,index.md} generator/{mdgen.py,sitegen.php} workdir
mv workdir/img/favicon.ico workdir/favicon.ico
- name: Generate site
run: |
cd workdir
php sitegen.php
rm -r post/*.md index.md *.{py,php}
- name: Upload GitHub Pages artifact
uses: actions/upload-pages-artifact@v1
with:
path: workdir
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
permissions:
contents: read
pages: write
id-token: write
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4