Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 11 additions & 24 deletions .github/workflows/asciidoc-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,21 +66,8 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
# Fetch all history for all branches
fetch-depth: 0

- name: Configure git
run: |
git config user.name "GitHub Actions"
git config user.email "p4lang@users.noreply.github.com"

- name: Rebase gh-pages branch
run: |
git fetch --all
git checkout main
git pull
git checkout gh-pages
git rebase --quiet main
ref: gh-pages
fetch-depth: 0

- name: Download spec artifact
uses: actions/download-artifact@v4
Expand All @@ -103,20 +90,20 @@ jobs:

- name: Copy files
run: |
pwd
ls -l *
cp spec/P4-16-spec.html docs/P4-16-working-spec.html
cp spec/P4-16-spec.pdf docs/P4-16-working-spec.pdf
cp psa-spec/PSA.html docs/PSA.html
cp psa-spec/PSA.pdf docs/PSA.pdf
cp psa-spec/charter/P4_Arch_Charter.html docs/
cp api-charter/P4_API_WG_charter.pdf docs/

- name: Commit changes
run: |
git add docs/P4-16-working-spec.{html,pdf} docs/PSA.{html,pdf} docs/P4_API_WG_charter.pdf docs/P4_Arch_Charter.html
git commit -am "docs for ${{ steps.vars.outputs.sha_short }}"

- name: Push commit to gh-pages branch
run: git push -f origin gh-pages
- name: Publish to gh-pages
uses: EndBug/add-and-commit@v9
with:
add: 'docs/P4-16-working-spec.html docs/P4-16-working-spec.pdf docs/PSA.html docs/PSA.pdf docs/P4_API_WG_charter.pdf docs/P4_Arch_Charter.html'
author_name: 'GitHub Actions'
author_email: 'p4lang@users.noreply.github.com'
message: 'Publish spec from GitHub Actions'
commit: '--amend'
push: 'origin gh-pages --force'