Merge pull request #323 from ogen-go/dependabot/npm_and_yarn/postcss-… #626
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: pages | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| env: | |
| # ogen ref to build the WebAssembly validator (cmd/ogen-wasm) from. | |
| OGEN_REF: main | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Checkout ogen | |
| uses: actions/checkout@v7 | |
| with: | |
| repository: ogen-go/ogen | |
| ref: ${{ env.OGEN_REF }} | |
| path: .ogen-src | |
| - name: Setup Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: stable | |
| - name: Build WASM validator | |
| run: OGEN_DIR="$GITHUB_WORKSPACE/.ogen-src" ./scripts/build-wasm.sh | |
| - name: Setup Node | |
| uses: actions/setup-node@v7 | |
| with: | |
| node-version-file: .nvmrc | |
| - name: Get yarn cache | |
| id: yarn-cache | |
| run: echo "::set-output name=dir::$(yarn cache dir)" | |
| - name: Cache dependencies | |
| uses: actions/cache@v6.1.0 | |
| with: | |
| path: ${{ steps.yarn-cache.outputs.dir }} | |
| key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-yarn- | |
| - run: yarn install --frozen-lockfile | |
| - run: yarn build | |
| - name: Deploy | |
| uses: peaceiris/actions-gh-pages@v4 | |
| if: ${{ github.ref == 'refs/heads/main' }} | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: ./build | |
| cname: ogen.dev |