name deploy

main
Tran Hau 2020-05-31 11:25:18 +07:00
parent cfc07b5c94
commit c11a8b4f33
1 changed files with 17 additions and 25 deletions

View File

@ -1,34 +1,26 @@
name: GitHub Pages name: GitHub Pages
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on: on:
push: push:
branches: [ master ] branches: master
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs: jobs:
# This workflow contains a single job called "build"
deploy: deploy:
# The type of runner that the job will run on
runs-on: ubuntu-18.04 runs-on: ubuntu-18.04
# Steps represent a sequence of tasks that will be executed as part of the job
steps: steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - name: Checkout
- uses: actions/checkout@v2 uses: actions/checkout@v2
# Runs a single command using the runners shell - name: Setup mdBook
- name: Setup mdBook uses: peaceiris/actions-mdbook@v1
uses: peaceiris/actions-mdbook@v1 with:
with: mdbook-version: "latest"
mdbook-version: 'latest'
- name: Build using mdBook
- name: Build run: mdbook build
run: mdbook build
- name: GitHub Pages action
- name: GitHub Pages action uses: peaceiris/actions-gh-pages@v3
uses: peaceiris/actions-gh-pages@v3 with:
with: github_token: ${{ secrets.GITHUB_TOKEN }}
github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: ./book
publish_dir: ./book