Skip to content

Sections copied from master to documentation branch! #53

Sections copied from master to documentation branch!

Sections copied from master to documentation branch! #53

Workflow file for this run

name: documentation
on:
pull_request:
branches: [documentation]
push:
branches: [documentation]
jobs:
# write_front_matter:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2
# with:
# ref: documentation
# - name: Write in frontmatter
# run: |
# find ./docs/ -name "*.md" -print0 | xargs -0 -I file ./prepend.sh file
# #find ./docs/ -type f -name "README.md" -exec sed -i 's+sections/+./+g' {} +
# #find ./docs/ -type f -name "README.md" | while read fname; do
# # dirname=`dirname "$fname"`
# # foldername=`basename "$dirname"`
# # filename=`basename "$fname"`
# # newname=`echo "$dirname" | sed -e "s+sections/+/docs/+g"`
# # cp "${dirname}/$filename" "./${foldername}/00-FrontPage.md"
# #done
# #find ./docs/ -type f -name "README.md" -exec rm {} +
# #mv "./docs/README.md" "./docs/00-FrontPage.md"
# #sed -i 's+sections/+./+g' 00-FrontPage.md
# # find ./ -type f -name "README.md" -exec sed -i 's+sections/+./+g' {} +
# - name: Commit files
# run: |
# git config --local user.email "[email protected]"
# git config --local user.name "GitHub Action"
# git add .
# git commit -m "Add changes" -a
# - name: Push changes
# uses: ad-m/github-push-action@master
# with:
# github_token: ${{ secrets.GITHUB_TOKEN }}
# branch: documentation
checks:
# needs: [write_front_matter]
if: github.event_name !='push'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: "12.x"
- name: Deploy
run: |
if [ -e yarn.lock ]; then
yarn install --frozen-lockfile
elif [ -e package-lock.json ]; then
npm ci
else
npm i
fi
npm run build
gh-release:
# needs: [write_front_matter]
if: github.event_name != 'pull_request'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: "12.x"
- name: Release to GitHub Pages
env:
USE_SSH: true
GIT_USER: git
run: |
git config --global user.email "[email protected]"
git config --global user.name "GitHub Action"
if [ -e yarn.lock ]; then
yarn install --frozen-lockfile
elif [ -e package-lock.json ]; then
npm ci
else
npm i
fi
npx docusaurus build
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build