-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (43 loc) · 1.38 KB
/
workflow.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: Github Pages Astro CI
on:
workflow_dispatch:
push:
branches: [main]
schedule:
- cron: "30 21 * * *" # every day at 21:30 UTC (= 22:30 CET)
jobs:
combined-workflow:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 18
# Install dependencies with npm
- name: Install dependencies
working-directory: frontend/
run: npm ci
# Build the project and add .nojekyll file to supress default behaviour
- name: Build frontend
working-directory: frontend/
env:
KB_EMAIL: ${{ secrets.KB_EMAIL }}
KB_PW: ${{ secrets.KB_PW }}
KB_LEAGUE_ID: ${{ secrets.KB_LEAGUE_ID }}
run: |
npm run build
ls -la
# Push to your pages repo
- name: Deploy frontend
uses: cpina/github-action-push-to-another-repository@main
env:
SSH_DEPLOY_KEY: ${{ secrets.SSH_DEPLOY_KEY }}
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}
with:
source-directory: 'frontend/dist'
destination-github-username: 'senoramarillo'
destination-repository-name: 'kickbase-information'
user-email: 'github-actions[bot]@users.noreply.github.com'
target-branch: gh-pages