github.com/yandex/pandora@v0.5.32/.github/workflows/pages.yml (about) 1 name: Deploy Hugo site to Pages 2 3 on: 4 push: 5 branches: 6 - dev 7 8 # Allows you to run this workflow manually from the Actions tab 9 workflow_dispatch: 10 11 # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages 12 permissions: 13 contents: read 14 pages: write 15 id-token: write 16 17 # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. 18 # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. 19 concurrency: 20 group: "pages" 21 cancel-in-progress: false 22 23 defaults: 24 run: 25 shell: bash 26 27 jobs: 28 build: 29 runs-on: ubuntu-latest 30 env: 31 HUGO_VERSION: 0.128.0 32 steps: 33 - name: Install Hugo CLI 34 run: | 35 wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \ 36 && sudo dpkg -i ${{ runner.temp }}/hugo.deb 37 hugo version 38 - name: Install Dart Sass 39 run: sudo snap install dart-sass 40 - name: Checkout 41 uses: actions/checkout@v4 42 with: 43 submodules: recursive 44 fetch-depth: 0 45 - name: Setup Pages 46 id: pages 47 uses: actions/configure-pages@v4 48 - name: Install Node.js 49 uses: actions/setup-node@v3 50 with: 51 node-version: 20 52 - name: Install Node.js dependencies 53 run: | 54 cd docs 55 echo "npm install -g postcss postcss-cli autoprefixer" 56 npm i 57 [[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true 58 - name: Build with Hugo 59 env: 60 # For maximum backward compatibility with Hugo modules 61 HUGO_ENVIRONMENT: production 62 HUGO_ENV: production 63 TZ: America/Los_Angeles 64 run: | 65 cd docs 66 hugo \ 67 --gc \ 68 --minify \ 69 --baseURL "${{ steps.pages.outputs.base_url }}/" 70 - name: Upload artifact 71 uses: actions/upload-pages-artifact@v3 72 with: 73 path: ./docs/public 74 75 deploy: 76 environment: 77 name: github-pages 78 url: ${{ steps.deployment.outputs.page_url }} 79 runs-on: ubuntu-latest 80 needs: build 81 steps: 82 - name: Deploy to GitHub Pages 83 id: deployment 84 uses: actions/deploy-pages@v4