Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Github Action to automatically publish PRs to GitHub Pages #52

Merged
merged 8 commits into from
Mar 7, 2024
Merged
Changes from 6 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
11 changes: 4 additions & 7 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
contents: write
pages: write
id-token: write

Expand All @@ -28,17 +28,14 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Pages
uses: actions/configure-pages@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: "pip"

- name: Install dependencies
run: make install
run: make init

- name: Build website
run: make clean && make publish
Expand All @@ -48,6 +45,6 @@ jobs:
git config user.name "Automated"
git config user.email "[email protected]"
timestamp=$(date -u +%FT%T%z)
ghp-import -m "Generate Pelican site ${timestamp}" --no-history --branch gh-pages output
git push origin gh-pages
ghp-import -m "Generate Pelican site ${timestamp}" --no-history --cname 'conference.scipy.org' --branch gh-pages output
git push --force origin gh-pages