Skip to content

community: rework the teams cards #452

community: rework the teams cards

community: rework the teams cards #452

Workflow file for this run

name: "CI - Pull Request"

Check warning on line 1 in .github/workflows/deploy-pr.yml

View workflow run for this annotation

GitHub Actions / CI - Pull Request

Workflow execution policy warning (evaluate mode)

On November 2, 2026, GitHub will restrict `pull_request_target` on public repositories by default. To continue allowing the event trigger, configure an Actions policy. Learn more: https://gh.io/securely-using-pull_request_target#default-policy-for-pull_request_target
on:
pull_request_target:
paths-ignore:
- "**.nix"
- 'flake.lock'
- "core/i18n/**"
- "package.json"
- "package-lock.json"
- "core/package.json"
branches:
- main
concurrency:
group: "${{ github.workflow }}-${{ github.head_ref || github.ref_name }}"
cancel-in-progress: true
permissions:
contents: read
jobs:
check:
name: "Check nixos.org PR"
runs-on: "ubuntu-latest"
permissions:
contents: read
steps:
- name: "Checking out the PR repository"
uses: "actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1" # v7.0.1
with:
ref: ${{ github.event.pull_request.head.sha }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
fetch-depth: 0
persist-credentials: false
clean: true
# TODO: rework ci (or switch systems entirely) to circumvent this
allow-unsafe-pr-checkout: true
- name: "Install npm dependencies"
run: |
npm install --workspaces --include-workspace-root
- name: "Check formatting"
run: |
npm exec --package=prettier -c 'prettier --check ./core/src'
- name: "Lint"
run: |
npm exec --package=eslint -c 'eslint'
build:
name: "Build nixos.org PR"
runs-on: "ubuntu-latest"
needs: check
permissions:
contents: read
steps:
- name: "Checking out the PR repository"
uses: "actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1" # v7.0.1
with:
ref: ${{ github.event.pull_request.head.sha }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
fetch-depth: 0
persist-credentials: false
clean: true
# TODO: rework ci (or switch systems entirely) to circumvent this
allow-unsafe-pr-checkout: true
- name: "Installing Nix"
uses: "cachix/install-nix-action@13d8dd58da0234aa297dedd986986ccb8e7f3e24" # v31.11.1
- name: "Build"
run: nix build
- name: "Upload build artifact"
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: nixos-homepage-artifact
path: ./result
publish:
name: "Publish nixos.org PR"
runs-on: "ubuntu-latest"
needs: build
permissions:
contents: read # to fetch PR changes
pull-requests: write # to post PR comments
statuses: write # to set commit status
steps:
- name: "Download build artifact"
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: nixos-homepage-artifact
path: ./build
- name: "Publish to Netlify"
uses: "nwtgck/actions-netlify@d22a32a27c918fe470bbc562e984f80ec48c2668" # v4.0.0
env:
NETLIFY_AUTH_TOKEN: "${{ secrets.NETLIFY_AUTH_TOKEN }}"
NETLIFY_SITE_ID: "${{ secrets.NETLIFY_SITE_ID }}"
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
deploy-message: "Published from GitHub Actions"
publish-dir: "./build"
enable-pull-request-comment: true
overwrites-pull-request-comment: false
enable-commit-comment: false
enable-commit-status: true
alias: "${{ github.event_name == 'push' && github.ref_name || '' }}"
enable-github-deployment: false