|
9 | 9 | push: |
10 | 10 | branches: [ master ] |
11 | 11 |
|
12 | | -env: |
13 | | - HUGO_ENV: production |
| 12 | +#env: |
| 13 | +# HUGO_ENV: production |
14 | 14 |
|
15 | 15 | # A workflow run is made up of one or more jobs that can run sequentially or in parallel |
16 | 16 | jobs: |
17 | 17 | # This workflow contains a single job called "deploy" |
18 | 18 | deploy: |
19 | 19 | # The type of runner that the job will run on |
20 | | - runs-on: ubuntu-20.04 |
21 | | - |
| 20 | + runs-on: ubuntu-22.04 |
| 21 | + concurrency: |
| 22 | + group: ${{ github.workflow }}-${{ github.ref }} |
22 | 23 | # Steps represent a sequence of tasks that will be executed as part of the job |
23 | 24 | steps: |
24 | 25 |
|
25 | 26 | # Step 1 - Checks-out your repository under $GITHUB_WORKSPACE |
26 | 27 | - name: Checkout |
27 | | - uses: actions/checkout@v2 |
| 28 | + uses: actions/checkout@v4 |
28 | 29 | with: |
29 | 30 | submodules: true # Fetch Hugo themes |
30 | 31 | fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod |
31 | 32 |
|
32 | 33 | # Step 2 - Sets up the latest version of Hugo |
33 | 34 | - name: Setup Hugo |
34 | | - uses: peaceiris/actions-hugo@v2 |
| 35 | + uses: peaceiris/actions-hugo@v3 |
| 36 | + with: |
| 37 | + hugo-version: '0.119.0' |
| 38 | + |
| 39 | + - name: Setup Ruby |
| 40 | + uses: ruby/setup-ruby@v1 |
35 | 41 | with: |
36 | | - hugo-version: 'latest' |
| 42 | + ruby-version: 3.2 |
| 43 | + |
| 44 | + - run: gem install asciidoctor |
| 45 | + |
| 46 | + - name: Run Hugo |
| 47 | + run: | |
| 48 | + alias asciidoctor="asciidoctor --attribute=experimental=true --attribute=icons=font" |
| 49 | + hugo --minify |
37 | 50 |
|
38 | 51 | # Step 3 - Clean and don't fail |
39 | 52 | - name: Clean public directory |
40 | 53 | run: rm -rf public |
41 | 54 |
|
42 | 55 | # Step 4 - Builds the site using the latest version of Hugo |
43 | 56 | # Also specifies the theme we want to use |
44 | | - - name: Build |
45 | | - run: hugo --theme=ananke |
| 57 | + #- name: Build |
| 58 | + # run: hugo --theme=ananke |
46 | 59 |
|
47 | 60 | # Step 5 - Create name file |
48 | 61 | #- name: Create cname file |
|
51 | 64 | # Step 6 - Push our generated site to our gh-pages branch |
52 | 65 | - name: Deploy |
53 | 66 | uses: peaceiris/actions-gh-pages@v3 |
| 67 | + if: ${{ github.ref == 'refs/heads/main' }} |
54 | 68 | with: |
55 | | - github_token: ${{ secrets.GITHUB_TOKEN }} |
| 69 | + github_token: ${{ secrets.JMHREIF_COM_TOKEN }} |
56 | 70 | publish_dir: ./public |
0 commit comments