Skip to content

Commit

Permalink
use action
Browse files Browse the repository at this point in the history
  • Loading branch information
yliuuuu committed Jan 22, 2024
1 parent 3215194 commit ba5f475
Showing 1 changed file with 22 additions and 32 deletions.
54 changes: 22 additions & 32 deletions .github/workflows/pr_to_gh_page_repo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,46 +31,36 @@ jobs:
name: id_rsa
known_hosts: unnecessary

- name: Send pull-request
run: |
REPOSITORY="partiql.github.io"
FOLDER="bin/$REPOSITORY"
BRANCH_NAME="Update-Playground"
echo "${{ secrets.SSH_PRIVATE_KEY }}" > key
gh ssh-key add key
git clone [email protected]:partiql/partiql.github.io.git $FOLDER
echo "clone completed"
cd $FOLDER
ls
- 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"
# Create a new feature branch for the changes.
git checkout -b $BRANCH_NAME
# Remove Static Folder
# 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
# Commit the changes and push the feature branch to origin
git add .
git commit -m "update playground"
git push origin $BRANCH_NAME
gh pr create \
--body "Port From ${{ github.head_ref }}. Commit: ${{ github.sha }}" \
--title "Update Playground" \
--head "$BRANCH_NAME" \
--base "main"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- 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: []

0 comments on commit ba5f475

Please sign in to comment.