From d3b398e8d75ecc39c8c02343e383de92ac7feb7c Mon Sep 17 00:00:00 2001 From: pww217 Date: Mon, 9 May 2022 12:44:03 -0500 Subject: [PATCH 01/12] split files, add s3 push --- .github/workflows/build-alpha.yml | 58 +++++++++++++++++++ .../{build.yml => build-unstable.yml} | 24 ++++++-- .github/workflows/{lint.yml => js-lint.yml} | 9 ++- 3 files changed, 84 insertions(+), 7 deletions(-) create mode 100644 .github/workflows/build-alpha.yml rename .github/workflows/{build.yml => build-unstable.yml} (68%) rename .github/workflows/{lint.yml => js-lint.yml} (80%) diff --git a/.github/workflows/build-alpha.yml b/.github/workflows/build-alpha.yml new file mode 100644 index 00000000000..6aa1e4d7ba4 --- /dev/null +++ b/.github/workflows/build-alpha.yml @@ -0,0 +1,58 @@ +name: Build + +on: + push: + tags: + - '**' # Currently any tag, need to slim down + paths: + - pyscriptjs/** + - .github/workflows/** # Test that workflows work when changed + + pull_request: + paths: + - pyscriptjs/** + - .github/workflows/** + +jobs: + build: + runs-on: ubuntu-latest + permissions: + contents: read + id-token: write + defaults: + run: + working-directory: ./pyscriptjs + + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Install node + uses: actions/setup-node@v3 + with: + node-version: 12.x + - name: Cache node modules + uses: actions/cache@v3 + 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: Install dependencies + run: | + npm install + - name: Build pyscript + run: | + npm run build + # 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: Sync to S3 + run: aws s3 sync . s3://pyscript-static/unstable/ # What artifacts exactly need to be copied? diff --git a/.github/workflows/build.yml b/.github/workflows/build-unstable.yml similarity index 68% rename from .github/workflows/build.yml rename to .github/workflows/build-unstable.yml index 3d2fa2e3870..d9ea0683ce5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build-unstable.yml @@ -2,7 +2,8 @@ name: Build on: push: # Only run on merges into master that modify files under pyscriptjs/ - branches: main + branches: + - main paths: - pyscriptjs/** - .github/workflows/** # Test that workflows work when changed @@ -13,11 +14,14 @@ on: - .github/workflows/** jobs: - build: - runs-on: ubuntu-latest # Will be self hosted soon - defaults: - run: - working-directory: ./pyscriptjs + build: + runs-on: ubuntu-latest + permissions: + contents: read + id-token: write + defaults: + run: + working-directory: ./pyscriptjs steps: - name: Checkout @@ -44,3 +48,11 @@ jobs: - name: Build pyscript run: | npm run build + # 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: Sync to S3 + run: aws s3 sync . s3://pyscript-static/unstable/ # What artifacts exactly need to be copied? diff --git a/.github/workflows/lint.yml b/.github/workflows/js-lint.yml similarity index 80% rename from .github/workflows/lint.yml rename to .github/workflows/js-lint.yml index a957268f199..29d9fcb5feb 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/js-lint.yml @@ -1,11 +1,18 @@ name: Lint on: + push: # Only run on merges into master that modify files under pyscriptjs/ branches: - main + paths: + - pyscriptjs/** + - .github/workflows/** # Test that workflows work when changed - pull_request: # Run on any PR that modifies files in pyscriptjs/ + pull_request: # Run on any PR that modifies files in pyscriptjs/ + paths: + - pyscriptjs/** + - .github/workflows/** jobs: build: From 15b4a51edfa64a56032d78d93406e9902532c04a Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 9 May 2022 17:44:27 +0000 Subject: [PATCH 02/12] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- .github/workflows/build-alpha.yml | 78 ++++++++++++++-------------- .github/workflows/build-unstable.yml | 78 ++++++++++++++-------------- 2 files changed, 78 insertions(+), 78 deletions(-) diff --git a/.github/workflows/build-alpha.yml b/.github/workflows/build-alpha.yml index 6aa1e4d7ba4..35a1f144616 100644 --- a/.github/workflows/build-alpha.yml +++ b/.github/workflows/build-alpha.yml @@ -14,45 +14,45 @@ on: - .github/workflows/** jobs: - build: - runs-on: ubuntu-latest - permissions: - contents: read - id-token: write - defaults: - run: - working-directory: ./pyscriptjs + build: + runs-on: ubuntu-latest + permissions: + contents: read + id-token: write + defaults: + run: + working-directory: ./pyscriptjs - steps: - - name: Checkout - uses: actions/checkout@v3 - - name: Install node - uses: actions/setup-node@v3 - with: - node-version: 12.x - - name: Cache node modules - uses: actions/cache@v3 - env: - cache-name: cache-node-modules - with: + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Install node + uses: actions/setup-node@v3 + with: + node-version: 12.x + - name: Cache node modules + uses: actions/cache@v3 + 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: Install dependencies - run: | - npm install - - name: Build pyscript - run: | - npm run build + 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: Install dependencies + run: | + npm install + - name: Build pyscript + run: | + npm run build # 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: Sync to S3 - run: aws s3 sync . s3://pyscript-static/unstable/ # What artifacts exactly need to be copied? + - 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/unstable/ # What artifacts exactly need to be copied? diff --git a/.github/workflows/build-unstable.yml b/.github/workflows/build-unstable.yml index d9ea0683ce5..8d54bf2e9c4 100644 --- a/.github/workflows/build-unstable.yml +++ b/.github/workflows/build-unstable.yml @@ -14,45 +14,45 @@ on: - .github/workflows/** jobs: - build: - runs-on: ubuntu-latest - permissions: - contents: read - id-token: write - defaults: - run: - working-directory: ./pyscriptjs + build: + runs-on: ubuntu-latest + permissions: + contents: read + id-token: write + defaults: + run: + working-directory: ./pyscriptjs - steps: - - name: Checkout - uses: actions/checkout@v3 - - name: Install node - uses: actions/setup-node@v3 - with: - node-version: 12.x - - name: Cache node modules - uses: actions/cache@v3 - env: - cache-name: cache-node-modules - with: + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Install node + uses: actions/setup-node@v3 + with: + node-version: 12.x + - name: Cache node modules + uses: actions/cache@v3 + 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: Install dependencies - run: | - npm install - - name: Build pyscript - run: | - npm run build + 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: Install dependencies + run: | + npm install + - name: Build pyscript + run: | + npm run build # 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: Sync to S3 - run: aws s3 sync . s3://pyscript-static/unstable/ # What artifacts exactly need to be copied? + - 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/unstable/ # What artifacts exactly need to be copied? From a7dd3e3725f2546bbe01fbf7350500130d9ad682 Mon Sep 17 00:00:00 2001 From: pww217 Date: Mon, 9 May 2022 12:47:41 -0500 Subject: [PATCH 03/12] dedent --- .github/workflows/js-lint.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/js-lint.yml b/.github/workflows/js-lint.yml index 29d9fcb5feb..6b4b4631976 100644 --- a/.github/workflows/js-lint.yml +++ b/.github/workflows/js-lint.yml @@ -9,10 +9,10 @@ on: - pyscriptjs/** - .github/workflows/** # Test that workflows work when changed - pull_request: # Run on any PR that modifies files in pyscriptjs/ - paths: - - pyscriptjs/** - - .github/workflows/** + pull_request: # Run on any PR that modifies files in pyscriptjs/ + paths: + - pyscriptjs/** + - .github/workflows/** jobs: build: From c5f2067348055b4bf9d90ce60bc6848d72202315 Mon Sep 17 00:00:00 2001 From: pww217 Date: Mon, 9 May 2022 12:49:12 -0500 Subject: [PATCH 04/12] indent --- .github/workflows/build-alpha.yml | 66 ++++++++++++++-------------- .github/workflows/build-unstable.yml | 66 ++++++++++++++-------------- 2 files changed, 66 insertions(+), 66 deletions(-) diff --git a/.github/workflows/build-alpha.yml b/.github/workflows/build-alpha.yml index 35a1f144616..5804611374e 100644 --- a/.github/workflows/build-alpha.yml +++ b/.github/workflows/build-alpha.yml @@ -23,36 +23,36 @@ jobs: run: working-directory: ./pyscriptjs - steps: - - name: Checkout - uses: actions/checkout@v3 - - name: Install node - uses: actions/setup-node@v3 - with: - node-version: 12.x - - name: Cache node modules - uses: actions/cache@v3 - 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: Install dependencies - run: | - npm install - - name: Build pyscript - run: | - npm run build - # 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: Sync to S3 - run: aws s3 sync . s3://pyscript-static/unstable/ # What artifacts exactly need to be copied? + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Install node + uses: actions/setup-node@v3 + with: + node-version: 12.x + - name: Cache node modules + uses: actions/cache@v3 + 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: Install dependencies + run: | + npm install + - name: Build pyscript + run: | + npm run build + # 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: Sync to S3 + run: aws s3 sync . s3://pyscript-static/unstable/ # What artifacts exactly need to be copied? diff --git a/.github/workflows/build-unstable.yml b/.github/workflows/build-unstable.yml index 8d54bf2e9c4..358b34302fa 100644 --- a/.github/workflows/build-unstable.yml +++ b/.github/workflows/build-unstable.yml @@ -23,36 +23,36 @@ jobs: run: working-directory: ./pyscriptjs - steps: - - name: Checkout - uses: actions/checkout@v3 - - name: Install node - uses: actions/setup-node@v3 - with: - node-version: 12.x - - name: Cache node modules - uses: actions/cache@v3 - 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: Install dependencies - run: | - npm install - - name: Build pyscript - run: | - npm run build - # 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: Sync to S3 - run: aws s3 sync . s3://pyscript-static/unstable/ # What artifacts exactly need to be copied? + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Install node + uses: actions/setup-node@v3 + with: + node-version: 12.x + - name: Cache node modules + uses: actions/cache@v3 + 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: Install dependencies + run: | + npm install + - name: Build pyscript + run: | + npm run build + # 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: Sync to S3 + run: aws s3 sync . s3://pyscript-static/unstable/ # What artifacts exactly need to be copied? From d53d88e6e1d321d9405f0648c35c6a36313082e9 Mon Sep 17 00:00:00 2001 From: pww217 Date: Mon, 9 May 2022 12:50:10 -0500 Subject: [PATCH 05/12] alpha directory --- .github/workflows/build-alpha.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-alpha.yml b/.github/workflows/build-alpha.yml index 5804611374e..ab9865f1298 100644 --- a/.github/workflows/build-alpha.yml +++ b/.github/workflows/build-alpha.yml @@ -55,4 +55,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/unstable/ # What artifacts exactly need to be copied? + run: aws s3 sync . s3://pyscript-static/alpha/ # What artifacts exactly need to be copied? From 05b171bb0678025cf0eca8b1260428ec4f307766 Mon Sep 17 00:00:00 2001 From: pww217 Date: Mon, 9 May 2022 12:56:27 -0500 Subject: [PATCH 06/12] remove on: PR from alpha --- .github/workflows/build-alpha.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/build-alpha.yml b/.github/workflows/build-alpha.yml index ab9865f1298..328d97334aa 100644 --- a/.github/workflows/build-alpha.yml +++ b/.github/workflows/build-alpha.yml @@ -8,11 +8,6 @@ on: - pyscriptjs/** - .github/workflows/** # Test that workflows work when changed - pull_request: - paths: - - pyscriptjs/** - - .github/workflows/** - jobs: build: runs-on: ubuntu-latest From 000c838007dbfffdddf7909ece171d2ad92d66c3 Mon Sep 17 00:00:00 2001 From: pww217 Date: Mon, 9 May 2022 13:25:47 -0500 Subject: [PATCH 07/12] workflow names --- .github/workflows/build-alpha.yml | 2 +- .github/workflows/build-unstable.yml | 2 +- .github/workflows/js-lint.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-alpha.yml b/.github/workflows/build-alpha.yml index 07b28441551..5a00056efd5 100644 --- a/.github/workflows/build-alpha.yml +++ b/.github/workflows/build-alpha.yml @@ -1,4 +1,4 @@ -name: Build +name: "[CI] Build Alpha" on: push: diff --git a/.github/workflows/build-unstable.yml b/.github/workflows/build-unstable.yml index 169d873558c..a928678c3dc 100644 --- a/.github/workflows/build-unstable.yml +++ b/.github/workflows/build-unstable.yml @@ -1,4 +1,4 @@ -name: Build +name: "[CI] Build Unstable" on: push: # Only run on merges into master that modify files under pyscriptjs/ diff --git a/.github/workflows/js-lint.yml b/.github/workflows/js-lint.yml index 9117a9420ee..f9729c3cbc4 100644 --- a/.github/workflows/js-lint.yml +++ b/.github/workflows/js-lint.yml @@ -1,4 +1,4 @@ -name: Lint +name: "[Test] Lint JS" on: From e31634850be56efd3ab9733a70da143e04c271bd Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 9 May 2022 18:27:35 +0000 Subject: [PATCH 08/12] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- .github/workflows/build-alpha.yml | 2 +- .github/workflows/build-unstable.yml | 2 +- .github/workflows/js-lint.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-alpha.yml b/.github/workflows/build-alpha.yml index 5a00056efd5..18740b495cd 100644 --- a/.github/workflows/build-alpha.yml +++ b/.github/workflows/build-alpha.yml @@ -1,4 +1,4 @@ -name: "[CI] Build Alpha" +name: '[CI] Build Alpha' on: push: diff --git a/.github/workflows/build-unstable.yml b/.github/workflows/build-unstable.yml index a928678c3dc..ae95391a740 100644 --- a/.github/workflows/build-unstable.yml +++ b/.github/workflows/build-unstable.yml @@ -1,4 +1,4 @@ -name: "[CI] Build Unstable" +name: '[CI] Build Unstable' on: push: # Only run on merges into master that modify files under pyscriptjs/ diff --git a/.github/workflows/js-lint.yml b/.github/workflows/js-lint.yml index f9729c3cbc4..86a7da54835 100644 --- a/.github/workflows/js-lint.yml +++ b/.github/workflows/js-lint.yml @@ -1,4 +1,4 @@ -name: "[Test] Lint JS" +name: '[Test] Lint JS' on: From 352cdfbe15db7fac74b6f0304c8d2d78934f0271 Mon Sep 17 00:00:00 2001 From: pww217 Date: Mon, 9 May 2022 14:36:47 -0500 Subject: [PATCH 09/12] remove js-lint.yml (replaced by pre-commit); add sync-examples.yml --- .github/workflows/build-alpha.yml | 2 +- .github/workflows/build-unstable.yml | 2 +- .github/workflows/js-lint.yml | 47 ---------------------------- .github/workflows/sync-examples.yml | 29 +++++++++++++++++ 4 files changed, 31 insertions(+), 49 deletions(-) delete mode 100644 .github/workflows/js-lint.yml create mode 100644 .github/workflows/sync-examples.yml diff --git a/.github/workflows/build-alpha.yml b/.github/workflows/build-alpha.yml index 5a00056efd5..b745bca9ea1 100644 --- a/.github/workflows/build-alpha.yml +++ b/.github/workflows/build-alpha.yml @@ -6,7 +6,7 @@ on: - '**' # Currently any tag, need to slim down paths: - pyscriptjs/** - - .github/workflows/** # Test that workflows work when changed + - .github/workflows/build-alpha.yml # Test that workflow works when changed jobs: build: diff --git a/.github/workflows/build-unstable.yml b/.github/workflows/build-unstable.yml index a928678c3dc..9ffc63b90d4 100644 --- a/.github/workflows/build-unstable.yml +++ b/.github/workflows/build-unstable.yml @@ -6,7 +6,7 @@ on: - main paths: - pyscriptjs/** - - .github/workflows/** # Test that workflows work when changed + - .github/workflows/build-unstable.yml # Test that workflow works when changed pull_request: # Run on any PR that modifies files in pyscriptjs/ paths: diff --git a/.github/workflows/js-lint.yml b/.github/workflows/js-lint.yml deleted file mode 100644 index f9729c3cbc4..00000000000 --- a/.github/workflows/js-lint.yml +++ /dev/null @@ -1,47 +0,0 @@ -name: "[Test] Lint JS" - -on: - - push: # Only run on merges into master that modify files under pyscriptjs/ - branches: - - main - paths: - - pyscriptjs/** - - .github/workflows/** # Test that workflows work when changed - - pull_request: # Run on any PR that modifies files in pyscriptjs/ - paths: - - pyscriptjs/** - - .github/workflows/** - -jobs: - build: - runs-on: ubuntu-latest - defaults: - run: - working-directory: ./pyscriptjs - steps: - - name: Checkout - uses: actions/checkout@v3 - - name: Install node - uses: actions/setup-node@v3 - with: - node-version: 18.x - - name: Cache node modules - uses: actions/cache@v3 - 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: Install dependencies - run: | - npm install - - name: Run linter - run: | - npm run lint diff --git a/.github/workflows/sync-examples.yml b/.github/workflows/sync-examples.yml new file mode 100644 index 00000000000..d9ace296dfe --- /dev/null +++ b/.github/workflows/sync-examples.yml @@ -0,0 +1,29 @@ +name: "[CI] Sync Examples" + +on: + push: # Only run on merges into master that modify files under pyscriptjs/ + branches: + - main + paths: + - pyscriptjs/examples/** + - .github/workflows/sync-examples.yml # Test that workflow works when changed + +jobs: + build: + runs-on: ubuntu-latest + permissions: + contents: read + id-token: write + defaults: + run: + working-directory: ./pyscriptjs/examples + + steps: + # 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: Sync to S3 + run: aws s3 sync . s3://pyscript-static/examples/ From 6ac88a41e96bd75f59035e1a50509d2a70ddf400 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 9 May 2022 19:37:42 +0000 Subject: [PATCH 10/12] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- .github/workflows/sync-examples.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sync-examples.yml b/.github/workflows/sync-examples.yml index d9ace296dfe..e049c7d870f 100644 --- a/.github/workflows/sync-examples.yml +++ b/.github/workflows/sync-examples.yml @@ -1,4 +1,4 @@ -name: "[CI] Sync Examples" +name: '[CI] Sync Examples' on: push: # Only run on merges into master that modify files under pyscriptjs/ From 70a645530ca88e2e8ca5287545613eb70d08228d Mon Sep 17 00:00:00 2001 From: Peter W <34256109+pww217@users.noreply.github.com> Date: Mon, 9 May 2022 17:25:15 -0500 Subject: [PATCH 11/12] Update sync-examples.yml --- .github/workflows/sync-examples.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sync-examples.yml b/.github/workflows/sync-examples.yml index e049c7d870f..980f0b606e1 100644 --- a/.github/workflows/sync-examples.yml +++ b/.github/workflows/sync-examples.yml @@ -1,7 +1,7 @@ name: '[CI] Sync Examples' on: - push: # Only run on merges into master that modify files under pyscriptjs/ + push: # Only run on merges into main that modify files under pyscriptjs/examples/ branches: - main paths: From 95e80e80e45abdb6adead534ca7d8f8996ecddb3 Mon Sep 17 00:00:00 2001 From: Peter W <34256109+pww217@users.noreply.github.com> Date: Mon, 9 May 2022 17:27:05 -0500 Subject: [PATCH 12/12] change unstable to latest, master -> main --- .github/workflows/{build-unstable.yml => build-latest.yml} | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) rename .github/workflows/{build-unstable.yml => build-latest.yml} (89%) diff --git a/.github/workflows/build-unstable.yml b/.github/workflows/build-latest.yml similarity index 89% rename from .github/workflows/build-unstable.yml rename to .github/workflows/build-latest.yml index 60828ce89e2..fb19705d44c 100644 --- a/.github/workflows/build-unstable.yml +++ b/.github/workflows/build-latest.yml @@ -1,12 +1,12 @@ -name: '[CI] Build Unstable' +name: '[CI] Build Latest' on: - push: # Only run on merges into master that modify files under pyscriptjs/ + push: # Only run on merges into main that modify files under pyscriptjs/ branches: - main paths: - pyscriptjs/** - - .github/workflows/build-unstable.yml # Test that workflow works when changed + - .github/workflows/build-latest.yml # Test that workflow works when changed pull_request: # Run on any PR that modifies files in pyscriptjs/ paths: