Add alts for easier translations (#1623) #1
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
###################################### | |
## Custom Web Almanac GitHub action ## | |
###################################### | |
# | |
# This generates the chapters and tests the website | |
# | |
# For pushes to main it also updates timestamps and increments CSS. | |
# Then we open a Pull Request for any changes generated. We do this | |
# only on a push, rather than on pull request, and only on main to | |
# avoid avoid merge conflicts acorss pull requests (and also because | |
# that would require personal access tokens to be set up for pull | |
# requests from forks). | |
# | |
name: Generate Chapters | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
paths: | |
- src/**.js | |
- src/**.css | |
- src/**.html | |
- src/content/**.md | |
- src/**.py | |
- src/**.json | |
- src/requirements.txt | |
jobs: | |
build: | |
name: Generate Chapters and Update Timestamps | |
runs-on: ubuntu-latest | |
if: github.repository == 'HTTPArchive/almanac.httparchive.org' | |
steps: | |
- name: Checkout branch | |
uses: actions/[email protected] | |
with: | |
fetch-depth: 0 | |
- name: Setup Node.js for use with actions | |
uses: actions/[email protected] | |
with: | |
node-version: 12.x | |
- name: Set up Python 3.8 | |
uses: actions/[email protected] | |
with: | |
python-version: '3.8' | |
- name: Run the website | |
run: ./src/tools/scripts/run_and_test_website.sh | |
- name: Create Pull Request | |
id: cpr | |
uses: peter-evans/[email protected] | |
with: | |
title: Update datestamps and generate chapters | |
branch-suffix: timestamp | |
commit-message: Generate Chapters | |
body: | | |
Updated datestamps and regenerated the chapters | |
- Please merge today or we'll get new datestamps tomorrow and you'll have to merge again! | |
- Auto-generated by [create-pull-request][1] GitHub Action | |
[1]: https://github.com/peter-evans/create-pull-request | |
labels: generate chapters | |
- name: Check outputs | |
run: echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}" |