-
Notifications
You must be signed in to change notification settings - Fork 1
31 lines (25 loc) · 945 Bytes
/
ci.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
name: CI
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Deno Setup
uses: denoland/setup-deno@v1
with:
deno-version: "1.45.5"
- name: Build
run: |
git clone https://github.com/smack0007/smack0007.github.io.git -b pages bin
sudo chown -R $USER:$USER ./bin
deno task build:ci
- name: Publish
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
run: |
git log -1 --pretty=%B > commit.msg
cd bin
git config --global user.name "$GITHUB_ACTOR"
git config --global user.email "${GITHUB_ACTOR}@bots.github.com"
git add -A && git commit -F "../commit.msg" || true
git push "https://x-access-token:${{ secrets.API_KEY }}@github.com/${GITHUB_REPOSITORY}.git" || true