diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..c3df11f --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,37 @@ +name: Hexo Deploy Automatically + +on: + push: + branches: + - master + +jobs: + build: + + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [9.x] + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + + - name: Build + run: | + yarn global add gulp-cli + yarn + gulp build + + - name: Deploy + uses: peaceiris/actions-gh-pages@v3 + with: + deploy_key: ${{ secrets.DEPLOY_KEY }} + publish_branch: release + publish_dir: ./dist