-
-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (37 loc) · 1.21 KB
/
main.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
name: main
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
jobs:
main:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build
run: |
mkdir output
mv index.html copy.png favicon.png og.png favicon.ico likely.css likely.js output
- name: Make screenshot
uses: chuhlomin/actions/screenshot@main
with:
url: file://${{github.workspace}}/output/index.html
mode: page
output: screenshot.png
width: 600
height: 600
deviceScaleFactor: 2
cornerRadius: 20
addShadow: true
uploadArtifact: ${{ github.event_name == 'pull_request' }}
commit: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }}
- name: Deploy
uses: cloudflare/wrangler-action@v3.3.2
if: github.event_name == 'push' && !contains(github.event.head_commit.message, '[skip deploy]')
with:
apiToken: ${{ secrets.CF_API_TOKEN }}
accountId: ${{ secrets.CF_ACCOUNT_ID }}
command: pages deploy output --project-name=timestamp --branch=main --commit-dirty=true