Skip to content

Commit

Permalink
Merge pull request #30 from GrabarzUndPartner/feature/update-actions
Browse files Browse the repository at this point in the history
chore(actions): reduce the actions
  • Loading branch information
ThornWalli authored May 26, 2020
2 parents ef79ca3 + fc9ec80 commit 4cc976b
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 56 deletions.
39 changes: 28 additions & 11 deletions .github/workflows/preview.yml → .github/workflows/master.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: Preview
name: Master
on:
push:
branches:
- 'master'
- master

jobs:
install:
Expand All @@ -19,20 +19,42 @@ jobs:
- uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}

- name: Checkout Repo
uses: actions/checkout@v1

- name: cache node_modules
uses: actions/cache@v1
id: cache
with:
path: node_modules
key: ${{ matrix.os }}-node-v${{ matrix.node }}-deps-${{ hashFiles(format('{0}{1}', github.workspace, '/package-lock.json')) }}

- name: Install Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: npm ci
- name: Test
run: npm run test

semantic-version:
name: Semantic Release
needs: install
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [ubuntu-latest]
node: [12]

steps:
- uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}
- name: Checkout Repo
uses: actions/checkout@v1
- name: Versioning
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
npx -p semantic-release -p @semantic-release/git -p @semantic-release/changelog -p @semantic-release/exec -p semantic-release-ado semantic-release --provider=github
build-gh-pages:
name: Build (GH-Pages)
Expand All @@ -48,28 +70,23 @@ jobs:
- uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}

- name: Checkout Repo
uses: actions/checkout@v1

- name: cache node_modules
uses: actions/cache@v1
id: cache
with:
path: node_modules
key: ${{ matrix.os }}-node-v${{ matrix.node }}-deps-${{ hashFiles(format('{0}{1}', github.workspace, '/package-lock.json')) }}

- name: Build
run: |
npm run generate
cp -R reports/* dist/reports/
touch dist/.nojekyll
env:
WEBSITE_HOST: https://grabarzundpartner.github.io/nuxt-font-loader-strategy
WEBSITE_HOST: 'https://grabarzundpartner.github.io/nuxt-font-loader-strategy'
BASE_PATH: /nuxt-font-loader-strategy/
DIST_PATH: dist
GITHUB_URL: https://github.com/GrabarzUndPartner/nuxt-font-loader-strategy

- name: Archive Production Artifact
uses: actions/upload-artifact@master
with:
Expand Down
34 changes: 0 additions & 34 deletions .github/workflows/release.yml

This file was deleted.

10 changes: 3 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

[![Grabarz & Partner - Module][grabarz-partner-module-src]][grabarz-partner-href]

[![Preview][github-workflow-preview-src]][github-workflow-preview-href]
[![Release][github-workflow-release-src]][github-workflow-release-href]
[![Master][github-workflow-master-src]][github-workflow-master-href]

[![npm version][npm-version-src]][npm-version-href]
[![npm downloads][npm-downloads-src]][npm-downloads-href]
Expand Down Expand Up @@ -266,11 +265,8 @@ Connection speed dependent font loading, requires the support of `navigator.conn
[renovate-status-src]: <https://img.shields.io/badge/renovate-enabled-brightgreen>
[renovate-status-href]: <https://renovate.whitesourcesoftware.com/>

[github-workflow-release-src]: <https://github.com/GrabarzUndPartner/nuxt-font-loader-strategy/workflows/Release/badge.svg?branch=master>
[github-workflow-release-href]: <https://github.com/GrabarzUndPartner/nuxt-font-loader-strategy/actions?query=workflow%3ARelease>

[github-workflow-preview-src]: <https://github.com/GrabarzUndPartner/nuxt-font-loader-strategy/workflows/Preview/badge.svg?branch=master>
[github-workflow-preview-href]: <https://github.com/GrabarzUndPartner/nuxt-font-loader-strategy/actions?query=workflow%3APreview>
[github-workflow-master-src]: <https://github.com/GrabarzUndPartner/nuxt-font-loader-strategy/workflows/Master/badge.svg?branch=master>
[github-workflow-master-href]: <https://github.com/GrabarzUndPartner/nuxt-font-loader-strategy/actions?query=workflow%3AMaster>

[npm-version-src]: https://img.shields.io/npm/v/nuxt-font-loader-strategy/latest.svg?style=flat-square
[npm-version-href]: https://npmjs.com/package/nuxt-font-loader-strategy
Expand Down
2 changes: 1 addition & 1 deletion example/components/atoms/GithubCorner.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export default {
},
url: {
type: String,
default: process.env.GITHUB_URL || 'https://your-url'
default: process.env.GITHUB_REPO_URL || 'https://your-url'
}
}
}
Expand Down
8 changes: 5 additions & 3 deletions example/nuxt.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,20 @@ const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPl
module.exports = {
dev: isDev,

modern: 'client',
modern: isDev ? false : 'client',

rootDir: resolve(__dirname, '..'),
buildDir: resolve(__dirname, '.nuxt'),
srcDir: __dirname,

// mode: 'spa',

render: {
resourceHints: false
},

env: {
GITHUB_REPO_URL: `https://github.com/${process.env.GITHUB_REPOSITORY}`
},

build: {

filenames: {
Expand Down

0 comments on commit 4cc976b

Please sign in to comment.