mirror of
https://github.com/pyscript/pyscript.git
synced 2026-02-21 11:01:26 -05:00
fix ci issues (#312)
* test ci * sync fixes, ignore symlink * remove symlink * undo trigger tests * only deploy latest on merge, not PR * quotes to single
This commit is contained in:
5
.github/workflows/build-alpha.yml
vendored
5
.github/workflows/build-alpha.yml
vendored
@@ -16,7 +16,7 @@ jobs:
|
||||
id-token: write
|
||||
defaults:
|
||||
run:
|
||||
working-directory: ./pyscriptjs
|
||||
working-directory: pyscriptjs
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
@@ -43,6 +43,7 @@ jobs:
|
||||
- name: Build pyscript
|
||||
run: |
|
||||
npm run build
|
||||
|
||||
# Deploy to S3
|
||||
- name: Configure AWS credentials
|
||||
uses: aws-actions/configure-aws-credentials@v1.6.1
|
||||
@@ -50,4 +51,4 @@ jobs:
|
||||
aws-region: ${{secrets.AWS_REGION}}
|
||||
role-to-assume: ${{ secrets.AWS_OIDC_RUNNER_ROLE }}
|
||||
- name: Sync to S3
|
||||
run: aws s3 sync . s3://pyscript-static/alpha/ # What artifacts exactly need to be copied?
|
||||
run: aws s3 sync --quiet ./examples/build/ s3://pyscript-static/alpha/
|
||||
|
||||
11
.github/workflows/build-latest.yml
vendored
11
.github/workflows/build-latest.yml
vendored
@@ -9,9 +9,11 @@ on:
|
||||
- .github/workflows/build-latest.yml # Test that workflow works when changed
|
||||
|
||||
pull_request: # Run on any PR that modifies files in pyscriptjs/
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- pyscriptjs/**
|
||||
- .github/workflows/**
|
||||
- .github/workflows/build-latest.yml # Test that workflow works when changed
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@@ -21,7 +23,7 @@ jobs:
|
||||
id-token: write
|
||||
defaults:
|
||||
run:
|
||||
working-directory: ./pyscriptjs
|
||||
working-directory: pyscriptjs
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
@@ -48,11 +50,14 @@ jobs:
|
||||
- name: Build pyscript
|
||||
run: |
|
||||
npm run build
|
||||
|
||||
# Deploy to S3
|
||||
- name: Configure AWS credentials
|
||||
if: github.ref == 'refs/heads/main' # Only deploy on merge into main
|
||||
uses: aws-actions/configure-aws-credentials@v1.6.1
|
||||
with:
|
||||
aws-region: ${{secrets.AWS_REGION}}
|
||||
role-to-assume: ${{ secrets.AWS_OIDC_RUNNER_ROLE }}
|
||||
- name: Sync to S3
|
||||
run: aws s3 sync . s3://pyscript-static/unstable/ # What artifacts exactly need to be copied?
|
||||
if: github.ref == 'refs/heads/main'
|
||||
run: aws s3 sync --quiet ./examples/build/ s3://pyscript-static/unstable
|
||||
|
||||
8
.github/workflows/sync-examples.yml
vendored
8
.github/workflows/sync-examples.yml
vendored
@@ -16,14 +16,18 @@ jobs:
|
||||
id-token: write
|
||||
defaults:
|
||||
run:
|
||||
working-directory: ./pyscriptjs/examples
|
||||
working-directory: pyscriptjs/examples
|
||||
|
||||
steps:
|
||||
|
||||
# Deploy to S3
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
- 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: Sync to S3
|
||||
run: aws s3 sync . s3://pyscript-static/examples/
|
||||
# Sync outdated or new files, delete ones no longer in source
|
||||
run: aws s3 sync --quiet --delete . s3://pyscript-static/examples/ # Sync directory, delete what is not in source
|
||||
|
||||
Reference in New Issue
Block a user