translation typos #51
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: Build static pages, trigger GitHub Pages deployment | |
on: | |
push: | |
#change branch name to trigger deployment. | |
branches: [ sudan-house ] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. | |
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. | |
concurrency: | |
group: "pages" | |
cancel-in-progress: false | |
jobs: | |
deploy: | |
runs-on: ubuntu-22.04 | |
steps: | |
# Checkout code | |
- uses: actions/checkout@v3 | |
# Build base image | |
- name: Build docker image | |
run: docker build --no-cache . -t sudan-house | |
# Generate static files for website, always exits with code 1 :( | |
- name: Generate static files via freeze | |
run: | | |
docker run --name naucse sudan-house pipenv run freeze || true | |
- name: Copy out static from the container | |
run: | | |
docker cp naucse:/root/.local/share/virtualenvs/opt-zvmYt2-H/src/naucse/naucse/_build naucse_build | |
if [ -z "$(ls -A naucse_build)" ]; then | |
echo 'Build folder empty, probably a failure in build due to syntax error. Check logs of the run. Aborting.' | |
exit 1 | |
else | |
echo 'Content Exists' | |
fi | |
echo "sudan-house-training.at" > naucse_build/CNAME | |
- name: Fix hrefs paths | |
run: | | |
python path_fixer.py | |
- name: Setup Pages | |
uses: actions/configure-pages@v5 | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
# Upload entire repository | |
path: './naucse_build/' | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 | |
- name: Cleanup | |
if: always() | |
run: | | |
docker rm naucse |