mirror of
https://github.com/pyscript/pyscript.git
synced 2025-12-19 10:17:23 -05:00
* Apply prettier to css, js, html, md, ts, and yml As a followup I will add prettier to the .pre-commit config. This patch is 100% generated by prettier. I used a forked version of prettier that understands the py-script tag. See https://github.com/hoodmane/pyscript-prettier-precommit for more info. * Apply old pre-commit * Revert some problems * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Revert some changes * More changes * Fix pre-commit * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
63 lines
2.2 KiB
YAML
63 lines
2.2 KiB
YAML
name: '[Docs] Build Release'
|
|
|
|
on:
|
|
release:
|
|
types: [published]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
id-token: write
|
|
env:
|
|
SPHINX_HTML_BASE_URL: https://docs.pyscript.net/
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
with:
|
|
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal access token.
|
|
fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository.
|
|
|
|
- name: Setup
|
|
uses: conda-incubator/setup-miniconda@v2
|
|
with:
|
|
auto-update-conda: true
|
|
activate-environment: docs
|
|
environment-file: docs/environment.yml
|
|
python-version: '3.9'
|
|
|
|
- name: Build
|
|
shell: bash -l {0}
|
|
run: |
|
|
cd docs/
|
|
make html
|
|
|
|
- name: Upload artifacts
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: pyscript-docs-${{ github.ref_name }}
|
|
path: docs/_build/html/
|
|
|
|
# Deploy to S3
|
|
- name: Configure AWS credentials
|
|
uses: aws-actions/configure-aws-credentials@v1.6.1
|
|
with:
|
|
aws-region: ${{ secrets.AWS_REGION }}
|
|
role-to-assume: ${{ secrets.AWS_OIDC_RUNNER_ROLE }}
|
|
|
|
- name: Copy redirect file
|
|
run: aws s3 cp --quiet ./docs/_build/html/_static/redirect.html s3://docs.pyscript.net/index.html
|
|
|
|
- name: Sync to S3
|
|
run: aws s3 sync --quiet ./docs/_build/html/ s3://docs.pyscript.net/${{ github.ref_name }}/
|
|
|
|
# Make sure to remove the latest folder so we sync the full docs upon release
|
|
- name: Delete latest directory
|
|
run: aws s3 rm --recursive s3://docs.pyscript.net/latest/
|
|
|
|
# Note that the files are the same as above, but we want to have folders with
|
|
# /<tag name>/ AND /latest/ which latest will always point to the latest release
|
|
- name: Sync to /latest
|
|
run: aws s3 sync --quiet ./docs/_build/html/ s3://docs.pyscript.net/latest/
|