Fix: make the home logo URL relative (#102) #18
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
name: documentation | |
on: | |
push: | |
branches: | |
- main | |
env: | |
PYTHON_VERSION: 3.x | |
permissions: | |
contents: write | |
id-token: write | |
pages: write | |
jobs: | |
documentation: | |
name: Build documentation | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup python ${{ env.PYTHON_VERSION }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ env.PYTHON_VERSION }} | |
cache: pip | |
cache-dependency-path: | | |
requirements.txt | |
- name: Install dependencies | |
run: make init | |
- name: Build documentation | |
run: make build | |
env: | |
GTM_ID: ${{ secrets.GTM_ID }} | |
- name: Configure AWS Credentials if S3 deploying is enabled | |
# Giving this step a name so we can check later if we need to deploy to GitHub Pages instead. | |
id: using-s3 | |
if: ${{ env.AWS_ACCESS_KEY_ID && env.AWS_SECRET_ACCESS_KEY && env.AWS_S3_BUCKET && env.AWS_REGION }} | |
uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
aws-region: ${{ secrets.AWS_REGION }} | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
AWS_REGION: ${{ secrets.AWS_REGION }} | |
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }} | |
- name: Push to S3 if enabled | |
if: ${{ steps.using-s3.conclusion == 'success' }} | |
run: aws s3 sync ./site/ s3://${{ secrets.AWS_S3_BUCKET }} --delete | |
env: | |
AWS_REGION: ${{ secrets.AWS_REGION }} | |
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }} | |
- name: Prepare GitHub Pages artifact if not deploying to S3 | |
if: ${{ steps.using-s3.conclusion == 'skipped' }} | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: site | |
- name: Deploy to GitHub Pages | |
if: ${{ steps.using-s3.conclusion == 'skipped' }} | |
continue-on-error: true | |
uses: actions/deploy-pages@v4 |