Skip to content

Deploy

Deploy #1070

Workflow file for this run

name: "Deploy"
on:
schedule:
- cron: '0 20 * * *'
workflow_dispatch:
jobs:
update:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: nixbuild/nix-quick-install-action@v21
with:
nix_conf: experimental-features = nix-command flakes
- name: update flake inputs
run: |
nix flake update
git add flake.lock
- name: update android sources
run: ./scripts/update.sh
- name: test
run: |
nix flake check --show-trace
nix flake check ./nix-android-repo --show-trace
- name: push
run: |
git config user.name "github-actions"
git config user.email "[email protected]"
./scripts/deploy.sh
channel:
runs-on: ubuntu-latest
needs: update
steps:
- uses: actions/checkout@v2
- uses: nixbuild/nix-quick-install-action@v21
with:
nix_conf: experimental-features = nix-command flakes
- name: build nixexprs
run: ./scripts/channel.sh
- name: deploy nix channel
uses: JamesIves/[email protected]
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: build
CLEAN: true
SINGLE_COMMIT: true
GIT_CONFIG_NAME: "github-actions"
GIT_CONFIG_EMAIL: "[email protected]"
sync:
runs-on: ubuntu-latest
needs: update
strategy:
matrix:
channel: [stable, beta, preview, canary]
steps:
- name: main -> ${{ matrix.channel }}
uses: devmasx/[email protected]
with:
type: now
from_branch: main
target_branch: ${{ matrix.channel }}
github_token: ${{ github.token }}
- uses: actions/checkout@v2
with:
ref: ${{ matrix.channel }}
- name: tag ${{ matrix.channel }}
run: |
git config user.name "github-actions"
git config user.email "[email protected]"
tag="$(date --utc --iso-8601)-${{ matrix.channel }}"
git tag --annotate --message "Version $tag" "$tag"
git push origin "$tag"