Adding some rh-impact logos #16
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
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: {} | |
jobs: | |
build: | |
# grumble | |
# https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions#github-hosted-runners | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token | |
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo | |
- uses: actions/setup-python@v2 | |
- name: Build the site | |
run: | | |
# Set up a virtualenv | |
python -m venv venv | |
source venv/bin/activate | |
python setup.py develop | |
# Build the sites | |
./asknot-ng.py templates/index.html questions/rh-impact.yml l10n/fedora/locale --theme rh-impact | |
- name: Swap out code for build output | |
run: | | |
# Hide the build directory, destroy everything else, and unpack the build contents | |
mv build .build | |
git rm -rf . | |
mv .build/* . | |
- name: Commit files | |
run: | | |
git config --local user.email "github-actions[bot]@users.noreply.github.com" | |
git config --local user.name "github-actions[bot]" | |
git add static/ en/ index.html | |
git commit -m "Automated update" | |
- name: Push changes | |
uses: ad-m/[email protected] | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
branch: build | |
force: true |