-
-
Notifications
You must be signed in to change notification settings - Fork 331
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Include manuals + pills as post build step (#1225)
and remove not used files --------- Co-authored-by: Thilo Billerbeck <[email protected]>
- Loading branch information
1 parent
8f645d6
commit 39c8714
Showing
175 changed files
with
1,500 additions
and
98,962 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
use nix | ||
use flake |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,76 +4,71 @@ on: | |
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
- preview | ||
- "main" | ||
pull_request: | ||
|
||
permissions: | ||
contents: write | ||
pull-requests: write | ||
statuses: write | ||
deployments: write | ||
contents: "write" | ||
pull-requests: "write" | ||
statuses: "write" | ||
deployments: "write" | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.ref_name }} | ||
group: "${{ github.workflow }}-${{ github.head_ref || github.ref_name }}" | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
|
||
build: | ||
name: "Build nixos.org" | ||
runs-on: ubuntu-latest | ||
runs-on: "ubuntu-latest" | ||
|
||
if: "!contains(github.event.head_commit.message, '[ci skip]')" | ||
|
||
steps: | ||
|
||
- name: "Checking out the repository" | ||
uses: actions/checkout@v4 | ||
uses: "actions/checkout@v4" | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: "Installing Nix" | ||
uses: cachix/install-nix-action@v23 | ||
with: | ||
extra_nix_config: | | ||
experimental-features = nix-command flakes | ||
uses: "cachix/install-nix-action@v23" | ||
|
||
- name: "Setup Cachix" | ||
uses: cachix/cachix-action@v12 | ||
uses: "cachix/cachix-action@v12" | ||
with: | ||
name: nixos-homepage | ||
name: "nixos-homepage" | ||
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}' | ||
|
||
- name: "Build" | ||
run: | | ||
nix develop --command npm install | ||
nix develop --command npm run build | ||
nix develop --accept-flake-config --command npm install | ||
nix develop --accept-flake-config --command npm run build | ||
mkdir build | ||
cp -RL ./dist/* ./build/ | ||
cp -RL ./netlify.toml ./build/ | ||
- name: "Publish to Netlify" | ||
if: github.repository == 'NixOS/nixos-homepage' | ||
uses: nwtgck/[email protected] | ||
if: ${{ github.repository == 'NixOS/nixos-homepage' }} | ||
uses: "nwtgck/[email protected]" | ||
env: | ||
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} | ||
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} | ||
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' | ||
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 | ||
|
||
# TODO: once we make main branch default we should change master->main | ||
production-branch: 'master' | ||
production-branch: "master" | ||
production-deploy: ${{ github.event_name == 'push' && github.ref_name == 'master' }} | ||
|
||
alias: ${{ github.event_name == 'push' && github.ref_name || '' }} | ||
alias: "${{ github.event_name == 'push' && github.ref_name || '' }}" | ||
|
||
enable-github-deployment: ${{ github.event_name == 'push' && 'true' || 'false' }} | ||
github-deployment-environment: ${{ github.event_name == 'push' && github.ref_name || format('pull-request-{0}', github.event.number) }} | ||
enable-github-deployment: ${{ github.event_name == 'push' }} | ||
github-deployment-environment: "${{ github.event_name == 'push' && github.ref_name || format('pull-request-{0}', github.event.number) }}" |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,61 +1,82 @@ | ||
name: "Daily Build & Deploy to Netlify" | ||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- "main" | ||
schedule: | ||
- cron: "0 0 * * *" | ||
workflow_dispatch: | ||
|
||
jobs: | ||
hourly-build-and-deploy: | ||
runs-on: ubuntu-latest | ||
if: "!contains(github.event.head_commit.message, '[ci skip]')" | ||
steps: | ||
- name: Checking out the repository | ||
uses: actions/checkout@v4 | ||
name: "Hourly build & deploy" | ||
runs-on: "ubuntu-latest" | ||
|
||
if: !contains(github.event.head_commit.message, '[ci skip]') | ||
|
||
- name: Installing Nix | ||
uses: cachix/install-nix-action@v23 | ||
steps: | ||
- name: "Checking out the repository" | ||
uses: "actions/checkout@v4" | ||
with: | ||
nix_path: nixpkgs=channel:nixos-unstable | ||
fetch-depth: 0 | ||
|
||
- name: "Installing Nix" | ||
uses: "cachix/install-nix-action@v23" | ||
|
||
- name: Setup Cachix | ||
uses: cachix/cachix-action@v12 | ||
- name: "Setup Cachix" | ||
uses: "cachix/cachix-action@v12" | ||
with: | ||
name: nixos-homepage | ||
name: "nixos-homepage" | ||
signingKey: "${{ secrets.CACHIX_SIGNING_KEY }}" | ||
|
||
- name: Update content | ||
- name: "Update content" | ||
run: | | ||
bash ./scripts/update.sh | ||
nix flake lock \ | ||
--update-input released-nixpkgs-unstable \ | ||
--update-input released-nixpkgs-stable \ | ||
--update-input released-nix-unstable \ | ||
--update-input released-nix-stable \ | ||
--update-input nix-pills | ||
- name: Building nixos.org | ||
- name: "Build" | ||
run: | | ||
nix build | ||
nix develop --command npm install | ||
nix develop --command npm run build | ||
mkdir build | ||
cp -RL ./result/* ./result/.well-known/ ./build/ | ||
cp -RL ./dist/* ./build/ | ||
- name: Deploy to Netlify | ||
uses: nwtgck/[email protected] | ||
- name: "Deploy to Netlify" | ||
if: ${{ github.repository == 'NixOS/nixos-homepage' }} | ||
uses: "nwtgck/[email protected]" | ||
env: | ||
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} | ||
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} | ||
NETLIFY_AUTH_TOKEN: "${{ secrets.NETLIFY_AUTH_TOKEN }}" | ||
NETLIFY_SITE_ID: "${{ secrets.NETLIFY_SITE_ID }}" | ||
with: | ||
production-branch: "master" | ||
production-deploy: true | ||
github-token: "${{ secrets.GITHUB_TOKEN }}" | ||
deploy-message: "Published from GitHub Actions" | ||
publish-dir: "./build" | ||
deploy-message: "Deploy from GitHub Actions" | ||
|
||
enable-pull-request-comment: true | ||
enable-commit-comment: true | ||
enable-commit-status: true | ||
overwrites-pull-request-comment: false | ||
if: github.repository == 'NixOS/nixos-homepage' | ||
enable-commit-comment: false | ||
enable-commit-status: true | ||
|
||
# TODO: once we make main branch default we should change master->main | ||
production-branch: "master" | ||
production-deploy: ${{ github.event_name == 'push' && github.ref_name == 'master' }} | ||
|
||
alias: "${{ github.event_name == 'push' && github.ref_name || '' }}" | ||
|
||
enable-github-deployment: ${{ github.event_name == 'push' }} | ||
github-deployment-environment: "${{ github.event_name == 'push' && github.ref_name || format('pull-request-{0}', github.event.number) }}" | ||
|
||
- name: Commit updated files and push them to master branch | ||
uses: stefanzweifel/git-auto-commit-action@v4 | ||
- name: "Commit updated files and push them to master branch" | ||
if: ${{ github.repository == 'NixOS/nixos-homepage' }} | ||
uses: "stefanzweifel/git-auto-commit-action@v4" | ||
with: | ||
commit_message: "Daily update [ci skip]" | ||
branch: "master" | ||
file_pattern: flake.lock blog/announcements.xml | ||
commit_user_name: NixOS webmaster | ||
commit_user_email: [email protected] | ||
commit_author: GitHub Actions <[email protected]> | ||
if: github.repository == 'NixOS/nixos-homepage' | ||
file_pattern: "flake.lock blog/announcements.xml" | ||
commit_user_name: "NixOS webmaster" | ||
commit_user_email: "[email protected]" | ||
commit_author: "GitHub Actions <[email protected]>" |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,23 @@ | ||
name: update-flake-lock | ||
name: "Update flake.lock" | ||
on: | ||
workflow_dispatch: # allows manual triggering | ||
schedule: | ||
- cron: '0 0 * * 0' # runs weekly on Sunday at 00:00 | ||
|
||
jobs: | ||
lockfile: | ||
runs-on: ubuntu-latest | ||
runs-on: "ubuntu-latest" | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Install Nix | ||
uses: cachix/install-nix-action@v23 | ||
- name: "Checkout repository" | ||
uses: "actions/checkout@v4" | ||
|
||
- name: "Install Nix" | ||
uses: "cachix/install-nix-action@v23" | ||
with: | ||
extra_nix_config: | | ||
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} | ||
- name: Update flake.lock | ||
uses: DeterminateSystems/update-flake-lock@v20 | ||
- name: "Update flake.lock" | ||
uses: "DeterminateSystems/update-flake-lock@v20" | ||
with: | ||
# we update nixos-common-styles manual | ||
# and the rest of the inputs are content inputs | ||
inputs: nixpkgs | ||
inputs: nixpkgs flake-utils |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,11 @@ | ||
*.html | ||
*.html.in | ||
*.xhtml | ||
|
||
/nixos/manual/ | ||
/nixos/nix-pills/ | ||
/nixpkgs/manual/ | ||
/nix/manual/ | ||
|
||
/manual/ | ||
/guides/ | ||
|
||
/images/screenshots/nixos-*-small.png | ||
|
||
/.direnv/ | ||
/build/ | ||
/demos/*.cast | ||
/demos/*.svg | ||
/tmp.* | ||
/favicon.png | ||
/favicon.ico | ||
/blog/announcements-rss.xml | ||
/blog/stories-rss.xml | ||
/site-styles/common-styles | ||
/site-styles/assets.tmp/ | ||
/nixos-release.tt | ||
/robots.txt | ||
|
||
/result* | ||
/styles | ||
|
||
|
||
# build output | ||
/dist/ | ||
# generated types | ||
/.astro/ | ||
|
||
# dependencies | ||
/node_modules/ | ||
|
||
# logs | ||
/npm-debug.log* | ||
/yarn-debug.log* | ||
/yarn-error.log* | ||
/pnpm-debug.log* | ||
|
||
# macOS-specific files | ||
.DS_Store | ||
/public/manual/ | ||
/public/guides/nix-pills/ | ||
/public/demos/*.cast | ||
/public/demos/*.svg |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.