garnet

Форк
0
/
deploy-website.yml 
50 строк · 1.6 Кб
1
name: Deploy to GitHub Pages
2

3
on:
4
  push:
5
    branches:
6
      - main
7
    paths:
8
      - '.github/workflows/deploy-website.yml'
9
      - 'website/**'
10
    # Review gh actions docs if you want to further define triggers, paths, etc
11
    # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on
12

13
permissions:
14
  contents: write
15

16
jobs:
17
  deploy:
18
    name: Deploy to GitHub Pages
19
    runs-on: ubuntu-latest
20
    defaults:
21
      run:
22
        working-directory: website
23
    steps:
24
      - uses: actions/checkout@v3
25
      - uses: actions/setup-node@v3
26
        with:
27
          node-version: 18
28
          cache: yarn
29
          cache-dependency-path: ./website/yarn.lock
30

31
      - name: Install dependencies
32
        run: yarn install --frozen-lockfile
33
      - name: Build website
34
        run: yarn build
35

36
      # Popular action to deploy to GitHub Pages:
37
      # Docs: https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-docusaurus
38
      - name: Deploy to GitHub Pages
39
        uses: peaceiris/actions-gh-pages@v3
40
        with:
41
          github_token: ${{ secrets.GITHUB_TOKEN }}
42
          # Build output to publish to the `gh-pages` branch:
43
          publish_dir: ./website/build
44
          # The following lines assign commit authorship to the official
45
          # GH-Actions bot for deploys to `gh-pages` branch:
46
          # https://github.com/actions/checkout/issues/13#issuecomment-724415212
47
          # The GH actions bot is used by default if you didn't specify the two fields.
48
          # You can swap them out with your own user credentials.
49
          user_name: github-actions[bot]
50
          user_email: 41898282+github-actions[bot]@users.noreply.github.com
51

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.