Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Update GitHub actions
  • Loading branch information
garbas committed Nov 17, 2020
1 parent 2f16e80 commit ed43cfc
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 16 deletions.
25 changes: 19 additions & 6 deletions .github/workflows/cron.yml
Expand Up @@ -11,28 +11,40 @@ jobs:
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Installing Nix
uses: cachix/install-nix-action@v10
uses: cachix/install-nix-action@v12
with:
nix_path: nixpkgs=channel:nixos-unstable

- name: Install unstable channel
run: |
nix-channel --add https://nixos.org/channels/nixpkgs-unstable
nix-channel --update
- name: Installing NixFlakes
run: |
nix-env -iA nixpkgs.nixFlakes
echo "::add-path::$HOME/.nix-profile/bin"
echo 'experimental-features = nix-command flakes' | sudo tee -a /etc/nix/nix.conf
nix --version
$HOME/.nix-profile/bin/nix --version
cat /etc/nix/nix.conf
- uses: cachix/cachix-action@v6
- uses: cachix/cachix-action@v8
with:
name: nixos-homepage
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'

- name: Update content
run: ./update.sh

- name: Building nixos.org
run: |
nix build
$HOME/.nix-profile/bin/nix build
mkdir build
cp -RL ./result/* ./build/
- name: Deploy to Netlify
uses: nwtgck/actions-netlify@v1
uses: nwtgck/actions-netlify@v1.1
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
Expand All @@ -45,6 +57,7 @@ jobs:
enable-commit-status: true
overwrites-pull-request-comment: false
if: github.repository == 'NixOS/nixos-homepage'

- name: Commit flake.lock, blogs.xml and push to master branch
uses: stefanzweifel/git-auto-commit-action@v4
with:
Expand Down
21 changes: 16 additions & 5 deletions .github/workflows/master.yml
Expand Up @@ -12,24 +12,35 @@ jobs:
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Installing Nix
uses: cachix/install-nix-action@v10
uses: cachix/install-nix-action@v12
with:
nix_path: nixpkgs=channel:nixos-unstable

- name: Install unstable channel
run: |
nix-channel --add https://nixos.org/channels/nixpkgs-unstable
nix-channel --update
- name: Installing NixFlakes
run: |
nix-env -iA nixpkgs.nixFlakes
echo "::add-path::$HOME/.nix-profile/bin"
echo 'experimental-features = nix-command flakes' | sudo tee -a /etc/nix/nix.conf
nix --version
$HOME/.nix-profile/bin/nix --version
cat /etc/nix/nix.conf
- uses: cachix/cachix-action@v6
- uses: cachix/cachix-action@v8
with:
name: nixos-homepage
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'

- name: Building nixos.org
run: |
nix build
$HOME/.nix-profile/bin/nix build
mkdir build
cp -RL ./result/* ./build/
- name: Deploy to Netlify
uses: nwtgck/actions-netlify@v1.1
env:
Expand Down
14 changes: 9 additions & 5 deletions .github/workflows/pulls.yml
Expand Up @@ -10,24 +10,28 @@ jobs:
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Installing Nix
uses: cachix/install-nix-action@v10
uses: cachix/install-nix-action@v12

- name: Installing NixFlakes
run: |
nix-env -iA nixpkgs.nixFlakes
echo "::add-path::$HOME/.nix-profile/bin"
echo 'experimental-features = nix-command flakes' | sudo tee -a /etc/nix/nix.conf
nix --version
$HOME/.nix-profile/bin/nix --version
cat /etc/nix/nix.conf
- uses: cachix/cachix-action@v6
- uses: cachix/cachix-action@v8
with:
name: nixos-homepage
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'

- name: Building nixos.org
run: |
nix build
$HOME/.nix-profile/bin/nix build
mkdir build
cp -RL ./result/* ./build/
- name: Deploy to Netlify
uses: nwtgck/actions-netlify@v1.1
env:
Expand Down

0 comments on commit ed43cfc

Please sign in to comment.