Daily Build #971
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
name: Daily Build | |
on: | |
schedule: | |
- cron: "0 0 * * *" | |
workflow_dispatch: | |
jobs: | |
format: | |
runs-on: ubuntu-latest | |
name: Format | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v2 | |
- name: Set up Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
cache: "npm" | |
- name: Install dependencies | |
run: npm install | |
- name: Check formatting | |
run: npm run format:check | |
lint: | |
runs-on: ubuntu-latest | |
name: Lint | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v2 | |
- name: Set up Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
cache: "npm" | |
- name: Install dependencies | |
run: npm install | |
- name: Run linter | |
run: npm run lint | |
check: | |
runs-on: ubuntu-latest | |
name: Check | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v2 | |
- name: Set up Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
cache: "npm" | |
- name: Install dependencies | |
run: npm install | |
- name: Run svelte-check | |
env: | |
CONTENTFUL_DELIVERY_KEY: ${{ secrets.CONTENTFUL_DELIVERY_KEY }} | |
CONTENTFUL_SPACE_ID: ${{ secrets.CONTENTFUL_SPACE_ID }} | |
CONTENTFUL_PREVIEW_KEY: ${{ secrets.CONTENTFUL_PREVIEW_KEY }} | |
CONTENTFUL_PREVIEW_FLAG: ${{ secrets.CONTENTFUL_PREVIEW_FLAG }} | |
run: npm run check | |
build: | |
runs-on: ubuntu-latest | |
name: Build | |
needs: [format, lint, check] | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v2 | |
- name: Set up Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
cache: "npm" | |
- name: Install dependencies | |
run: npm install | |
- name: Build website | |
env: | |
CONTENTFUL_DELIVERY_KEY: ${{ secrets.CONTENTFUL_DELIVERY_KEY }} | |
CONTENTFUL_SPACE_ID: ${{ secrets.CONTENTFUL_SPACE_ID }} | |
CONTENTFUL_PREVIEW_KEY: ${{ secrets.CONTENTFUL_PREVIEW_KEY }} | |
CONTENTFUL_PREVIEW_FLAG: ${{ secrets.CONTENTFUL_PREVIEW_FLAG }} | |
CLIENT_ACKEE_URL: ${{ secrets.CLIENT_ACKEE_URL }} | |
CLIENT_ACKEE_DOMAIN_ID: ${{ secrets.CLIENT_ACKEE_DOMAIN_ID }} | |
run: npm run build | |
- name: Install Netlify | |
run: npm install -g netlify-cli | |
- name: Deploy website | |
env: | |
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} | |
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} | |
run: netlify deploy --dir=build --prod |