-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Added a workflow to publish to netlify. * Try making a derivation to build the site rather than doing all the build steps on netlify. Had to remove the social plugin for now because it is trying to fetch fonts from Google during build. * Typos man. * One more little fix. Don't need to reference site because we are building the whole site with a derivation. * Use actions/checkout version 4. * Added a MAINTAINERS file with helpful breadcrumbs for how the repo and site are managed. * With nix buildings options and examples, we can ignore these directories and files and not commit them to the repo.
- Loading branch information
Showing
5 changed files
with
96 additions
and
20 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 |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# .github/workflows/netlify.yml | ||
name: Build and Deploy to Netlify | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build-and-deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Nix | ||
uses: cachix/install-nix-action@v22 | ||
with: | ||
github_access_token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Build Site | ||
run: | | ||
nix build .#site | ||
mkdir ./dist | ||
cp -R ./result/* ./dist/ | ||
chmod -R +w ./dist/ | ||
- name: Deploy to Netlify | ||
uses: nwtgck/actions-netlify@v2.0 | ||
with: | ||
publish-dir: './dist' | ||
production-branch: main | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
deploy-message: "Deploy from GitHub Actions" | ||
enable-pull-request-comment: true | ||
enable-commit-comment: true | ||
enable-commit-status: true | ||
overwrites-pull-request-comment: true | ||
env: | ||
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} | ||
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} | ||
timeout-minutes: 1 |
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,7 +1,13 @@ | ||
### Any locally created PDF files ### | ||
|
||
### Nix ### | ||
result | ||
|
||
### Site ### | ||
site/.cache | ||
# Examples are included during nix build except for the index file | ||
!site/docs/examples/index.md | ||
site/docs/examples/ | ||
# Options docs are included during nix build | ||
site/docs/documentation/modules/ |
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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Site | ||
|
||
## Netlify setup | ||
|
||
1. Go to Netlify create site page | ||
1. Select GitHub and pick the template repo you created in the Getting Started step. | ||
1. Finally click on the Deploy site button. | ||
|
||
## Steps to integrate with nwtgck/actions-netlify | ||
|
||
- Setup personal access token from netlify | ||
1. Go [here](https://app.netlify.com/user/applications#personal-access-tokens) | ||
1. Personal access token -> New access token | ||
1. Go to repo -> Settings -> Security -> Secrets and variables -> Actions -> Repository secrets | ||
1. Store the token as `NETLIFY_AUTH_TOKEN` | ||
- Setup site ID from netlify | ||
1. Go to netlify -> team page -> the site -> Site configuration -> Site information | ||
1. There is a field `Site ID`; copy that token | ||
1. Go to repo -> Settings -> Security -> Secrets and variables -> Actions -> Repository secrets | ||
1. Store the token as `NETLIFY_SITE_ID` | ||
- Let the action write comments on PRs | ||
1. Go to repo -> Settings -> Code and automation -> Actions -> General -> Workflow permissions | ||
1. Check 'Read and write permissions' | ||
- Turn off Netlify's Deploy Previews | ||
1. Go to [Site configuration -> Build & deploy -> Continuous Deployment -> Branches and deploy contexts](https://app.netlify.com/sites/nixcv/configuration/deploys#branches-and-deploy-contexts) | ||
1. Select `Configure` | ||
1. Under Deploy Previews, select `None` |
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
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 |
---|---|---|
|
@@ -94,7 +94,7 @@ theme: | |
|
||
plugins: | ||
- blog | ||
- social | ||
#- social | ||
- macros | ||
|
||
extra: | ||
|
599fd3b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉 Published on https://nixcv.netlify.app as production
🚀 Deployed on https://65c2f548c67b7d241a9868e7--nixcv.netlify.app