adding key #19
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: ⚙ Build the Hugo Site | |
| on: | |
| workflow_call: | |
| outputs: | |
| base_url: | |
| description: "The Base URL of the site" | |
| value: ${{ jobs.build.outputs.base_url }} | |
| push: | |
| branches: | |
| - main | |
| tags-ignore: | |
| - generated.** | |
| paths-ignore: | |
| - '.github/**' | |
| workflow_dispatch: | |
| permissions: write-all | |
| concurrency: | |
| group: "pages" | |
| cancel-in-progress: false | |
| defaults: | |
| run: | |
| shell: bash | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| env: | |
| HUGO_VERSION: 0.122.0 | |
| outputs: | |
| base_url: ${{ steps.pages.outputs.base_url }} | |
| steps: | |
| - name: Install Hugo CLI | |
| run: | | |
| wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \ | |
| && sudo dpkg -i ${{ runner.temp }}/hugo.deb | |
| - name: Install Dart Sass | |
| run: sudo snap install dart-sass | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| fetch-depth: 0 | |
| - name: Pull | |
| run: git pull | |
| - name: Get Haxe | |
| run: | | |
| sudo add-apt-repository ppa:haxe/releases -y | |
| sudo apt-get update | |
| sudo apt-get install haxe -y --quiet | |
| mkdir ~/haxelib && haxelib setup ~/haxelib | |
| - name: Install OpenFL | |
| run: haxelib install openfl --quiet | |
| - name: Install Lime | |
| run: haxelib install lime --quiet | |
| - name: Setup Lime | |
| run: haxelib run lime setup -y | |
| - name: build project | |
| run: lime build html5 -clean -final | |
| working-directory: infinite-engine | |
| - name: Setup Pages | |
| id: pages | |
| uses: actions/configure-pages@v3 | |
| - name: Setup Node | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: 20.10.0 | |
| - name: Install dependencies | |
| run: npm ci | |
| working-directory: site | |
| - name: Build | |
| env: | |
| HUGO_ENVIRONMENT: production | |
| HUGO_ENV: production | |
| run: | | |
| hugo \ | |
| --gc \ | |
| --minify \ | |
| --baseURL "${{ steps.pages.outputs.base_url }}/" | |
| working-directory: site | |
| - name: Upload Artifact | |
| uses: actions/upload-pages-artifact@v2 | |
| with: | |
| path: ./site/public | |
| deploy: | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| outputs: | |
| base_url: ${{ needs.build.outputs.base_url }} | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - name: Deploy | |
| id: deployment | |
| uses: actions/deploy-pages@v2 |