mirror of
https://github.com/pyscript/pyscript.git
synced 2025-12-19 18:27:29 -05:00
Bumps the github-actions group with 2 updates: [actions/setup-node](https://github.com/actions/setup-node) and [aws-actions/configure-aws-credentials](https://github.com/aws-actions/configure-aws-credentials). Updates `actions/setup-node` from 4 to 5 - [Release notes](https://github.com/actions/setup-node/releases) - [Commits](https://github.com/actions/setup-node/compare/v4...v5) Updates `aws-actions/configure-aws-credentials` from 4 to 5 - [Release notes](https://github.com/aws-actions/configure-aws-credentials/releases) - [Changelog](https://github.com/aws-actions/configure-aws-credentials/blob/main/CHANGELOG.md) - [Commits](https://github.com/aws-actions/configure-aws-credentials/compare/v4...v5) --- updated-dependencies: - dependency-name: actions/setup-node dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions - dependency-name: aws-actions/configure-aws-credentials dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
77 lines
2.4 KiB
YAML
77 lines
2.4 KiB
YAML
name: "Publish Unstable"
|
|
|
|
on:
|
|
push: # Only run on merges into main that modify files under core/ and examples/
|
|
branches:
|
|
- main
|
|
paths:
|
|
- core/**
|
|
- examples/**
|
|
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
publish-unstable:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
id-token: write
|
|
contents: read
|
|
defaults:
|
|
run:
|
|
working-directory: ./core
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v5
|
|
|
|
- name: Install node
|
|
uses: actions/setup-node@v5
|
|
with:
|
|
node-version: 20.x
|
|
|
|
- name: Python venv
|
|
run: python -m venv env
|
|
|
|
- name: Activate Python
|
|
run: source env/bin/activate
|
|
|
|
- name: Update pip
|
|
run: pip install --upgrade pip
|
|
|
|
- name: Install PyMinifier
|
|
run: pip install --ignore-requires-python python-minifier
|
|
|
|
- name: Install Setuptools
|
|
run: pip install setuptools
|
|
|
|
- name: Cache node modules
|
|
uses: actions/cache@v4
|
|
env:
|
|
cache-name: cache-node-modules
|
|
with:
|
|
# npm cache files are stored in `~/.npm` on Linux/macOS
|
|
path: ~/.npm
|
|
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-build-${{ env.cache-name }}-
|
|
${{ runner.os }}-build-
|
|
${{ runner.os }}-
|
|
|
|
- name: NPM Install
|
|
run: npm install && npx playwright install chromium
|
|
|
|
- name: Build
|
|
run: npm run build
|
|
|
|
- name: Generate index.html in snapshot
|
|
working-directory: .
|
|
run: sed -e 's#_PATH_#./#' -e 's#_DOC_VERSION_#latest#' -e 's#_TAG_VERSION_##' -e 's#_VERSION_#latest#' ./public/index.html > ./core/dist/index.html
|
|
|
|
- name: Configure AWS credentials
|
|
uses: aws-actions/configure-aws-credentials@v5
|
|
with:
|
|
aws-region: ${{ secrets.AWS_REGION }}
|
|
role-to-assume: ${{ secrets.AWS_OIDC_RUNNER_ROLE }}
|
|
|
|
- name: Sync to S3
|
|
run: aws s3 sync --quiet ./dist/ s3://pyscript.net/unstable/
|