mirror of
https://github.com/WerySkok/weryskok.ru.git
synced 2025-04-22 16:03:03 +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
|
||||
on:
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
@ -8,31 +8,37 @@ jobs:
|
|||
name: 🎉 Deploy
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: 🚚 Get latest code
|
||||
uses: actions/checkout@v2
|
||||
- name: 📦 Use cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: vendor/bundle
|
||||
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-gems-
|
||||
- name: 🏗️ Build website
|
||||
uses: helaili/jekyll-action@v2
|
||||
with:
|
||||
build_only: true
|
||||
- name: 📂 Sync files
|
||||
uses: SamKirkland/FTP-Deploy-Action@4.3.0
|
||||
with:
|
||||
server: ${{ secrets.FTP_WEB_SERVER }}
|
||||
username: ${{ secrets.USER_NAME }}
|
||||
password: ${{ secrets.FTP_PASSWORD }}
|
||||
local-dir: ./_site/
|
||||
server-dir: www/weryskok.ru/
|
||||
exclude: |
|
||||
**/.git*
|
||||
**/.git*/**
|
||||
**/node_modules/**
|
||||
**/files/**
|
||||
dry-run: true
|
||||
|
||||
- name: 🚚 Get latest code
|
||||
uses: actions/checkout@v2
|
||||
- name: 📦 Use cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: vendor/bundle
|
||||
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-gems-
|
||||
- name: 🔧 Setup Node.js
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16
|
||||
- name: 🛠️ Setup Ruby
|
||||
uses: ruby/setup-ruby@v1
|
||||
with:
|
||||
ruby-version: '3.0'
|
||||
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
||||
- name: 🏗️ Build website with Jekyll
|
||||
run: JEKYLL_ENV=production bundle exec jekyll build
|
||||
- name: 📂 Sync files
|
||||
uses: SamKirkland/FTP-Deploy-Action@4.3.0
|
||||
with:
|
||||
server: ${{ secrets.FTP_WEB_SERVER }}
|
||||
username: ${{ secrets.USER_NAME }}
|
||||
password: ${{ secrets.FTP_PASSWORD }}
|
||||
local-dir: ./_site/
|
||||
server-dir: www/weryskok.ru/
|
||||
exclude: |
|
||||
**/.git*
|
||||
**/.git*/**
|
||||
**/node_modules/**
|
||||
**/files/**
|
||||
dry-run: true
|
||||
|
|
Loading…
Reference in a new issue