Skip to content

use action

use action #14

name: PR To GitHub Page Repo
on:
push:
branches:
- react-website
jobs:
send-pull-requests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build Bundle
run: |
npm i
npm run build
- name: copy Bundle
run: |
mkdir -p $GITHUB_WORKSPACE/artifact
cp dist/*.wasm $GITHUB_WORKSPACE/artifact
cp dist/*.js $GITHUB_WORKSPACE/artifact
cp dist/*.txt $GITHUB_WORKSPACE/artifact
ls $GITHUB_WORKSPACE/artifact >> $GITHUB_STEP_SUMMARY
- name: set up SSH
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.SSH_PRIVATE_KEY }}
name: id_rsa
known_hosts: unnecessary
- name: checkout github page repo
uses: actions/checkout@v4
with:
repository: 'partiql/partiql.github.io'
ref: 'main'
ssh-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: port changes
run: |
# Setup the committers identity.
git config user.email "[email protected]"
git config user.name "PartiQL Team"
# port in the changes
rm -r ui/src/static
mkdir ui/src/static
cp $GITHUB_WORKSPACE/artifact/*.wasm ui/src/static
cp $GITHUB_WORKSPACE/artifact/*.js ui/src/static
cp $GITHUB_WORKSPACE/artifact/playground.js.LICENSE.txt ui/playground.js.LICENSE.txt
git add .
- name: create pull-request
uses: peter-evans/create-pull-request@v5
run: |
commit-message: Update report
committer: PartiQL Team <[email protected]>
branch: update-playground
delete-branch: true
title: 'Update Playground'
body: |
Update Playground
From Repo: [], branch: [], commit id: []