-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
5 additions
and
34 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 |
---|---|---|
|
@@ -5,50 +5,21 @@ on: | |
# Runs at 02:00 UTC every sunday | ||
# - cron: '0 2 * * 0' | ||
jobs: | ||
check-code: | ||
runs-on: ubuntu-latest | ||
env: | ||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | ||
steps: | ||
- name: Checkout 🛎️ | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: main | ||
- name: Install pnpm 📦 | ||
id: install-pnpm | ||
uses: pnpm/[email protected] | ||
with: | ||
version: '8.5.1' | ||
- name: Cache pnpm modules 💾 | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
cache: 'pnpm' | ||
- name: Install dependencies 🔧 | ||
id: install-dependencies | ||
run: | | ||
pnpm install | ||
pnpm sanityv3 install | ||
- uses: act10ns/slack@v1 | ||
with: | ||
status: ${{ job.status }} | ||
steps: ${{ toJson(steps) }} | ||
if: failure() | ||
backup-dataset: | ||
needs: check-code | ||
runs-on: ubuntu-latest | ||
name: Backup dataset | ||
strategy: | ||
matrix: | ||
dataset: ['global-development'] #${{ fromJson(needs.read-satellites.outputs.matrix) }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Export dataset | ||
uses: sanity-io/[email protected] | ||
- name: Export Data | ||
env: | ||
SANITY_AUTH_TOKEN: ${{ secrets.SANITY_DEPLOY }} | ||
with: | ||
args: ./sanityv3 dataset export ${{ matrix.dataset }} backups/${{ matrix.dataset }}.tar.gz | ||
run: | | ||
npm install -g @sanity/cli | ||
sanity install | ||
SANITY_AUTH_TOKEN=$SANITY_AUTH_TOKEN sanity dataset export ${{ matrix.dataset }} backups/backup-${{ matrix.dataset }}.tar.gz | ||
- name: Upload backup.tar.gz | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
|