-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfile.yml
More file actions
48 lines (41 loc) · 1.44 KB
/
Copy pathTaskfile.yml
File metadata and controls
48 lines (41 loc) · 1.44 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
44
45
46
47
48
version: '3'
dotenv: ['.env']
vars:
PAGES_DIR: '{{.PAGES_DIR | default "~/github-pages"}}'
S3_BUCKET: '{{.S3_BUCKET | default ""}}'
AWS_REGION: '{{.AWS_REGION | default "ap-northeast-1"}}'
tasks:
list:
desc: GitHub Pagesの公開済みHTMLファイル一覧
cmds:
- ./list-pages.sh
s3-list:
desc: S3に保存されたテキストファイル一覧
cmds:
- aws s3 ls "s3://{{.S3_BUCKET}}/content/" --region {{.AWS_REGION}} | awk '{print $4}' | sed 's/\.txt$//'
publish:
desc: S3からテキスト取得 → HTML生成 → GitHub Pagesにデプロイ(対話式)
interactive: true
cmds:
- |
echo "=== S3に保存されたファイル ==="
aws s3 ls "s3://{{.S3_BUCKET}}/content/" --region {{.AWS_REGION}} | awk '{print $4}' | sed 's/\.txt$//'
echo ""
echo "=== GitHub Pages 既存HTMLファイル ==="
./list-pages.sh | tail -n +3
echo ""
read -p "S3ファイル名(.txt不要): " S3_NAME
read -p "デプロイ先HTML名(.html不要、空欄でS3と同じ): " DEPLOY_NAME
if [ -z "$DEPLOY_NAME" ]; then
./publish.sh "$S3_NAME"
else
./publish.sh "$S3_NAME" "$DEPLOY_NAME"
fi
deploy-lambda:
desc: Lambda関数のコード更新
cmds:
- ./deploy/update-code.sh
preview:
desc: WebエディタのURL表示
cmds:
- cat deploy/deployment-info.txt | grep "Access URL"