Merge pull request #165 from karl-kraus/bk/fix/click-behavior #113
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 and publish | |
on: | |
push: | |
branches: ["main"] | |
workflow_dispatch: | |
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: | |
build_pages: | |
name: Publish Edition as GitHub Pages Website | |
runs-on: ubuntu-latest | |
env: | |
GITLAB_SOURCE_TOKEN: ${{ secrets.GITLAB_SOURCE_TOKEN }} | |
ANT_OPTS: -Xmx5g | |
TYPESENSE_HOST: typesense.acdh-dev.oeaw.ac.at | |
TYPESENSE_PORT: 443 | |
TYPESENSE_PROTOCOL: https | |
TYPESENSE_API_KEY: ${{secrets.TYPESENSE_API_KEY}} | |
steps: | |
- name: Perform Checkout | |
uses: actions/checkout@v4 | |
- name: Install pnpm | |
uses: pnpm/action-setup@v4 | |
with: | |
version: 9 | |
- name: Use Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: Node install | |
run: | | |
pnpm install | |
- name: Build Site Dependencies | |
run: | | |
pnpm run build | |
- name: Install Saxon, Ant and Python | |
run: | | |
apt-get update && apt-get install openjdk-11-jre-headless ant -y --no-install-recommend | |
./shellscripts/dl_saxon.sh | |
pip install -r requirements.txt | |
- name: Fetch data | |
run: ./shellscripts/fetch_data.sh | |
- name: Splitting the Edition | |
run: ./shellscripts/split_milestone_gesamt.sh | |
# - name: Adding TEI base, id, prev and next | |
# run: ./shellscripts/add-attributes.sh | |
- name: Build | |
run: | | |
ant build-full-edition | |
# - name: Update Favicons | |
# run: python update_favicons.py | |
- name: Install Playwright Browsers | |
run: pnpm exec playwright install --with-deps | |
- name: run tests | |
run: pnpm run e2e:run_all_tests | |
continue-on-error: true | |
if: github.event_name == 'workflow_dispatch' || contains(github.event.head_commit.message, '[run tests]') | |
- name: Setup Pages | |
uses: actions/configure-pages@v5 | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: './html' | |
- name: Deploy | |
id: deployment | |
uses: actions/deploy-pages@v4 | |
- name: Build Typesense Index | |
run: | | |
python ./py/make_ts_index.py | |
- name: deploy report | |
uses: peaceiris/actions-gh-pages@v4 | |
with: | |
deploy_key: ${{ secrets.REPORT_REPO_KEY }} | |
external_repository: karl-kraus/wpn-static-test-reports | |
publish_dir: ./playwright-report |