Skip to content

Commit 23c4e52

Browse files
authored
ci: add github actions for auto deploy (less#576)
* ci: add github actions for auto deploy * fix: recover jshintrc
1 parent bc58a8a commit 23c4e52

File tree

3 files changed

+38
-15
lines changed

3 files changed

+38
-15
lines changed

.github/workflows/deploy.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Deploy Docs
2+
3+
env: {NODE_VERSION: 14}
4+
5+
on:
6+
push:
7+
branches: [ master ]
8+
9+
# Allows you to run this workflow manually from the Actions tab
10+
workflow_dispatch:
11+
12+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
13+
jobs:
14+
# This workflow contains a single job called "build"
15+
deploy:
16+
# The type of runner that the job will run on
17+
runs-on: ubuntu-latest
18+
19+
# Steps represent a sequence of tasks that will be executed as part of the job
20+
steps:
21+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
22+
- uses: actions/checkout@v2
23+
- uses: actions/setup-node@v2
24+
with: {node-version: '${{ env.NODE_VERSION }}'}
25+
- name: install dependencies
26+
run: npm install
27+
- name: build docs
28+
run: node data/_utils/pkg && grunt
29+
- name: Deploy to GitHub Pages
30+
if: success()
31+
uses: crazy-max/ghaction-github-pages@v2
32+
with:
33+
repo: less/less.github.io
34+
target_branch: master
35+
build_dir: dest
36+
env:
37+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
[![CI Status](https://github.com/less/less-docs/actions/workflows/test.yml/badge.svg?branch=master)](https://github.com/less/less-docs/actions/workflows/test.yml?query=branch%3Amaster)
44
[![npm version](https://img.shields.io/npm/v/less)](https://www.npmjs.com/package/less)
5-
[![npm downloads](https://img.shields.io/npm/dm/less.svg?sanitize=true)](https://www.npmjs.com/package/less)
6-
[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT)
75
[![Twitter Follow Author](https://img.shields.io/twitter/follow/lesstocss)](https://twitter.com/lesstocss)
86

97
Official website and documentation for Less/Less.js

assets/root/README.md

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,4 @@
22

33
> Official website and documentation for Less/Less.js
44
5-
6-
### [Visit the website](http://lesscss.org)
7-
8-
### [Visit Less.js](https://github.com/less/less.js)
9-
10-
11-
Please go to the [main branch](https://github.com/less/less-docs) for source files.
12-
13-
## Contributing
14-
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using [Grunt](http://gruntjs.com).
15-
16-
## Release History
17-
_(Nothing yet)_
5+
This is github pages project for [lesscss.org](https://lesscss.org), please don't create pull request for this repo, if you want modify less documentation, [less/less-docs](https://github.com/less/less-docs) is for you, github actions will auto deploy docs build assets to github pages when your pr be merged.

0 commit comments

Comments
 (0)