Mirror of the sourcecode for my blog, original repo: https://github.com/NobbZ/blog-nobbz-dev
at code-meta 1.6 kB view raw
1# SPDX-FileCopyrightText: 2025 Norbert Melzer 2# SPDX-FileContributor: Norbert Melzer 3# 4# SPDX-License-Identifier: MIT 5 6name: Deploy the blog 7 8on: 9 push: 10 11jobs: 12 preflight: 13 runs-on: ubuntu-22.04 14 strategy: 15 matrix: 16 command: 17 - prettier -c . 18 - astro check 19 steps: 20 - uses: actions/checkout@v4 21 with: { token: "${{ secrets.GITHUB_TOKEN }}" } 22 - uses: actions/setup-node@v4 23 with: 24 node-version-file: ".tool-versions" 25 cache: "yarn" 26 cache-dependency-path: "yarn.lock" 27 - run: yarn install 28 - run: yarn ${{matrix.command}} 29 30 deploy: 31 runs-on: ubuntu-22.04 32 needs: 33 - preflight 34 steps: 35 - uses: actions/checkout@v4 36 with: { token: "${{ secrets.GITHUB_TOKEN }}" } 37 # - uses: cachix/install-nix-action@v20 38 # with: 39 # install_url: https://releases.nixos.org/nix/nix-2.9.1/install 40 # extra_nix_config: | 41 # access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} 42 # experimental-features = nix-command flakes 43 # - run: nix build .#blog 44 - uses: actions/setup-node@v4 45 with: 46 node-version-file: ".tool-versions" 47 cache: "yarn" 48 cache-dependency-path: "yarn.lock" 49 - run: yarn install 50 - run: yarn build 51 - uses: cloudflare/pages-action@1 52 with: 53 apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} 54 accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} 55 projectName: blog-nobbz-dev 56 # directory: ./result 57 directory: ./dist 58 gitHubToken: ${{ secrets.GITHUB_TOKEN }}