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:
Peter W
2022-05-10 12:27:06 -05:00
committed by GitHub
parent bc4581d9e5
commit 5f19756ff3
4 changed files with 17 additions and 8 deletions

View File

@@ -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/

View File

@@ -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

View File

@@ -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