-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #257 from fandango-fuzzer/dev
test: book url
- Loading branch information
Showing
1 changed file
with
24 additions
and
11 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: GitHub Pages | ||
name: GitHub Pages Deployment | ||
|
||
on: | ||
push: | ||
|
@@ -9,7 +9,7 @@ on: | |
workflow_dispatch: # Enables manual execution from the Actions tab | ||
|
||
permissions: | ||
pages: write | ||
contents: write # Needed for pushing to the other repository | ||
id-token: write | ||
|
||
jobs: | ||
|
@@ -42,13 +42,26 @@ jobs: | |
run: | | ||
jupyter-book build docs | ||
# Upload the book's HTML as an artifact | ||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v2 | ||
with: | ||
path: "docs/_build/html" | ||
# Push built HTML to fandango-fuzzer.github.io repository | ||
- name: Deploy to fandango-fuzzer.github.io | ||
env: | ||
TARGET_REPO: fandango-fuzzer/fandango-fuzzer.github.io | ||
TARGET_BRANCH: main | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
# Clone the target repository | ||
git clone --depth 1 https://github.com/${{ env.TARGET_REPO }} target-repo | ||
cd target-repo | ||
# Remove all existing files | ||
git rm -rf . || true | ||
# Copy new HTML files | ||
cp -r ../docs/_build/html/* . | ||
# Deploy the book's HTML to GitHub Pages | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v2 | ||
# Commit and push changes | ||
git config user.name "GitHub Actions" | ||
git config user.email "[email protected]" | ||
git add . | ||
git commit -m "Update GitHub Pages site" | ||
git push origin ${{ env.TARGET_BRANCH }} |