# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
name: GH Pages CI
on:
push:
branches: [ "master" ]
paths:
- jqClock.min.js
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: gh-pages
- name: Update js files
run: |
git fetch origin master --depth 1
git checkout origin/master -- *.js
- name: Create Pull Request for GH Pages
id: cpr-ghpages
uses: peter-evans/create-pull-request@v6
with:
branch: update-gh-pages
- name: Check outputs
if: ${{ steps.cpr-ghpages.outputs.pull-request-number }}
run: |
echo "Pull Request Number - ${{ steps.cpr-ghpages.outputs.pull-request-number }}"
echo "Pull Request URL - ${{ steps.cpr-ghpages.outputs.pull-request-url }}"
|