Skip to content

feat: 34. Find First and Last Position of Element in Sorted Array #259

feat: 34. Find First and Last Position of Element in Sorted Array

feat: 34. Find First and Last Position of Element in Sorted Array #259

Workflow file for this run

name: Build my gitbook and deploy to gh-pages
on:
workflow_dispatch:
push:
branches:
- master
jobs:
master-to-gh-pages:
runs-on: ubuntu-latest
steps:
- name: checkout master
uses: actions/checkout@v2
with:
submodules: recursive
ref: master
- name: install nodejs
uses: actions/setup-node@v3
with:
node-version: 10.14.1
- name: configue gitbook
run: |
npm install
npm install -g gitbook-cli
gitbook install
npm install -g gitbook-summary
- name: generate _book folder
run: |
book sm
ln -s -f SUMMARY.md Content.md
gitbook build
cp SUMMARY.md _book
- name: push _book to branch gh-pages
env:
TOKEN: ${{ secrets.GH_ACCESS_TOKEN }}
REF: github.com/${{github.repository}}
MYEMAIL: kimi0230@gmail.com
MYNAME: ${{github.repository_owner}}
run: |
cd _book
git config --global user.email "${MYEMAIL}"
git config --global user.name "${MYNAME}"
git init
git remote add origin https://${REF}
git add .
git commit -m "Updated By Github Actions With Build ${{github.run_number}} of ${{github.workflow}} For Github Pages"
git branch -M master
git push --force --quiet "https://${TOKEN}@${REF}" master:gh-pages