Welcome to mirror list, hosted at ThFree Co, Russian Federation.

build-to-docs.yml ยซ workflows ยซ .github - github.com/hivickylai/hugo-theme-sam.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: ef6a1e9f037393851b605624ec7aec5e3df09a8f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: Build exampleSite to docs/

on:
  push:
    branches:
      - master

jobs:
  build:

    runs-on: ubuntu-latest

    steps:
      - name: ๐Ÿ›Ž Check out master
        uses: actions/checkout@master
        with:
          fetch-depth: 1
      - name: ๐Ÿ”ง Install tools
        run: |
          sudo apt install curl jq
      - name: Use Node.js
        uses: actions/setup-node@master
        with:
          node-version: 10.x
      - run: npm i -g postcss postcss-cli autoprefixer
      - name: ๐Ÿคต Install Hugo
        run: |
          HUGO_VERSION=$(curl -s https://api.github.com/repos/gohugoio/hugo/releases/latest | jq -r '.tag_name')
          mkdir tmp/ && cd tmp/
          curl -sSL https://github.com/gohugoio/hugo/releases/download/${HUGO_VERSION}/hugo_extended_${HUGO_VERSION: -6}_Linux-64bit.tar.gz | tar -xvzf-
          sudo mv hugo /usr/local/bin/
          cd .. && rm -rf tmp/
          hugo version
      - name: ๐Ÿงน Clean site
        run: |
          if [ -d "docs" ]; then
            rm -rf docs/*
          fi
      - name: ๐Ÿณ Build site
        run: |
          cd exampleSite
          HUGO_THEME="hugo-theme-sam" hugo --themesDir ../.. -v -d ../docs/ -b https://victoria.dev/hugo-theme-sam
      - name: ๐Ÿš€ Deploy build
        run: |
          git config user.name "${GITHUB_ACTOR}"
          git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
          git add .
          git commit -am "๐Ÿš€ Deploy with ${GITHUB_WORKFLOW}"
          git push --all -f https://${{ secrets.GITHUB_TOKEN }}@github.com/${GITHUB_REPOSITORY}.git