mirror of
https://github.com/WerySkok/weryskok.ru.git
synced 2025-06-25 10:55:48 +03:00
Another attempt at using Actions
This commit is contained in:
parent
69c6a8e7c3
commit
6b26461e02
1 changed files with 35 additions and 29 deletions
64
.github/workflows/build_and_deploy.yml
vendored
64
.github/workflows/build_and_deploy.yml
vendored
|
@ -1,5 +1,5 @@
|
||||||
name: 🚀 Build and deploy website on push
|
name: 🚀 Build and deploy website on push
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
@ -8,31 +8,37 @@ jobs:
|
||||||
name: 🎉 Deploy
|
name: 🎉 Deploy
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: 🚚 Get latest code
|
- name: 🚚 Get latest code
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
- name: 📦 Use cache
|
- name: 📦 Use cache
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: vendor/bundle
|
path: vendor/bundle
|
||||||
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile') }}
|
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-gems-
|
${{ runner.os }}-gems-
|
||||||
- name: 🏗️ Build website
|
- name: 🔧 Setup Node.js
|
||||||
uses: helaili/jekyll-action@v2
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
build_only: true
|
node-version: 16
|
||||||
- name: 📂 Sync files
|
- name: 🛠️ Setup Ruby
|
||||||
uses: SamKirkland/FTP-Deploy-Action@4.3.0
|
uses: ruby/setup-ruby@v1
|
||||||
with:
|
with:
|
||||||
server: ${{ secrets.FTP_WEB_SERVER }}
|
ruby-version: '3.0'
|
||||||
username: ${{ secrets.USER_NAME }}
|
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
||||||
password: ${{ secrets.FTP_PASSWORD }}
|
- name: 🏗️ Build website with Jekyll
|
||||||
local-dir: ./_site/
|
run: JEKYLL_ENV=production bundle exec jekyll build
|
||||||
server-dir: www/weryskok.ru/
|
- name: 📂 Sync files
|
||||||
exclude: |
|
uses: SamKirkland/FTP-Deploy-Action@4.3.0
|
||||||
**/.git*
|
with:
|
||||||
**/.git*/**
|
server: ${{ secrets.FTP_WEB_SERVER }}
|
||||||
**/node_modules/**
|
username: ${{ secrets.USER_NAME }}
|
||||||
**/files/**
|
password: ${{ secrets.FTP_PASSWORD }}
|
||||||
dry-run: true
|
local-dir: ./_site/
|
||||||
|
server-dir: www/weryskok.ru/
|
||||||
|
exclude: |
|
||||||
|
**/.git*
|
||||||
|
**/.git*/**
|
||||||
|
**/node_modules/**
|
||||||
|
**/files/**
|
||||||
|
dry-run: true
|
||||||
|
|
Loading…
Reference in a new issue