-
Notifications
You must be signed in to change notification settings - Fork 2
74 lines (63 loc) · 1.83 KB
/
continuous-deployment.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
62
63
64
65
66
67
68
69
70
71
72
73
74
name: Continuous Deployment
on:
push:
branches:
- main
schedule:
- cron: "0 7 1 * *" # Every first day on every month at 7:00 AM UTC (10:00 AM Israel time).
# Allow this job to clone the repo and create a page deployment
permissions:
contents: write
pages: write
id-token: write
pull-requests: write
repository-projects: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout your repository using git
uses: actions/checkout@v3
- name: Install and build website
uses: withastro/action@v0
publish-release:
needs: build
runs-on: ubuntu-latest
name: Publish a release to GitHub
steps:
- uses: actions/checkout@v3
- name: Create Release 🚀
uses: ridedott/release-me-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
release-branches: '["main"]'
node-module: true
deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
# build-index:
# needs: deploy
# runs-on: ubuntu-latest
# name: Build search index and push it to Algolia
# steps:
# - name: Checkout your repository using git
# uses: actions/checkout@v3
# - name: Install dependencies
# run: npm install
# - name: Create index file
# run: node index-posts.js
# - name: Update index.json To Algolia
# run: npx atomic-algolia
# env:
# ALGOLIA_APP_ID: ${{ secrets.ALGOLIA_APP_ID }}
# ALGOLIA_ADMIN_KEY: ${{ secrets.ALGOLIA_ADMIN_KEY }}
# ALGOLIA_INDEX_NAME: index.json
# ALGOLIA_INDEX_FILE: ./dist/index.json