-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (54 loc) · 1.69 KB
/
publish.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
51
52
53
54
55
56
57
58
59
60
61
name: notify Telegram and publish a GitHub page
on:
workflow_dispatch:
schedule:
- cron: '0 5 * * *'
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
build:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
name: run script
runs-on: ubuntu-latest
steps:
- name: Check out this repository
uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.21.4'
cache-dependency-path: |
app/go.sum
- name: Build Go script
working-directory: ./app
run: go build .
- name: Run Go script
working-directory: ./app
run: go run .
env:
TELEGRAM_TOKEN: ${{ secrets.TELEGRAM_TOKEN }}
TELEGRAM_TO: ${{ secrets.TELEGRAM_TO }}
OPEN_WHEATHER_API_KEY: ${{ secrets.OPEN_WHEATHER_API_KEY }}
EXCHANGERATE_API_KEY: ${{ secrets.EXCHANGERATE_API_KEY }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
REGION_NAME: ${{ secrets.REGION_NAME }}
OPENAI_ACCESS_KEY: ${{ secrets.OPENAI_ACCESS_KEY }}
OPENAI_ORGANIZATION: ${{ secrets.OPENAI_ORGANIZATION }}
APP_SCRIPT_ID: ${{ secrets.APP_SCRIPT_ID }}
- name: Setup Pages
uses: actions/configure-pages@v2
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: './app/www/'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1