-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (38 loc) · 1.42 KB
/
Copy pathdeploy.yml
File metadata and controls
43 lines (38 loc) · 1.42 KB
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
name: Deploy Game to Website
# Срабатывать при пуше в ветку main
on:
push:
branches:
- main
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
# 1. Скачиваем код игры
- name: Checkout Source
uses: actions/checkout@v4
# 2. Ставим Node.js
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '22'
# 3. Устанавливаем зависимости и собираем
- name: Install and Build
run: |
npm ci
npm run build
mv dist/index.html dist/app.html
# Теперь у нас есть папка dist с готовой игрой
# 4. Отправляем папку dist в репозиторий сайта
- name: Push to Website Repository
uses: cpina/github-action-push-to-another-repository@main
env:
# Тот самый секрет, который мы создали
API_TOKEN_GITHUB: ${{ secrets.DEPLOY_TOKEN }}
with:
source-directory: 'dist'
destination-github-username: 'YurMil'
destination-repository-name: 'cadautoscript.com'
target-directory: 'static/utility-apps/cylindrical-shell-rolling' # Куда положить код
user-email: 'bot@pvt-game.com'
target-branch: main