Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: 👷 add doc builds to github actions #78

Merged
merged 2 commits into from
Mar 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 25 additions & 1 deletion .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,35 @@ jobs:
npm i
npm run test

- name: Build
- name: Nightly build
run: |
npm run release

- uses: actions/upload-artifact@v2
with:
name: build
path: dist/

docs:

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master

- name: Generate docs
run: |
npm i
npm run docs

- name: test
run: ls

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs
exclude_assets: node_modules
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'

10 changes: 5 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@ temp/
# Jasmine SpecRunner
_SpecRunner.html

# Ignore .html files in root
/*.html
!fab-toolbar-demo.html

ChildishGiant marked this conversation as resolved.
Show resolved Hide resolved
# Ignore compiled files
css/ghpages-materialize.css
bin/

# Ignore lock
yarn.lock
yarn.lock

# Compiled docs
/docs/*.html
!/docs/fab-toolbar-demo.html
1 change: 0 additions & 1 deletion CNAME

This file was deleted.

2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ The [issue tracker](https://github.com/materializecss/materialize/issues) is the

* Please **do not** use the issue tracker for personal support requests. [Stack Overflow `materialize`](https://stackoverflow.com/questions/tagged/materialize) tag is the best place to get help or use our [Gitter channel](https://gitter.im/materializecss/materialize).

* Please **do not** post comments like "+1" or ":thumbsup:". Use [GitHub's "reactions" feature](https://github.com/blog/2119-add-reactions-to-pull-requests-issues-and-comments) instead. We reserve the right to delete comments which violate this rule.
* Please **do not** post comments like "+1" or ":thumbsup:". Use [GitHub's "reactions" feature](https://github.com/blog/2119-add-reactions-to-pull-requests-issues-and-comments) instead. We reserve the right to delete comments which violate this rule.

* Please **do not** open issues without clearly stating the problem and desired result. [See the bug reports section](#bug-reports) for more information on creating effective issues.

Expand Down
133 changes: 74 additions & 59 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ module.exports = function(grunt) {
sourcemap: false
},
files: {
'css/ghpages-materialize.css': 'sass/ghpages-materialize.scss'
'docs/css/ghpages-materialize.css': 'sass/ghpages-materialize.scss'
}
},

Expand Down Expand Up @@ -97,7 +97,7 @@ module.exports = function(grunt) {
src: 'dist/css/materialize.min.css'
},
gh: {
src: 'css/ghpages-materialize.css'
src: 'docs/css/ghpages-materialize.css'
},
bin: {
src: 'bin/materialize.css'
Expand Down Expand Up @@ -393,62 +393,59 @@ module.exports = function(grunt) {
}
},
files: {
'index.html': 'jade/index.jade',
'icons.html': 'jade/icons.jade',
'about.html': 'jade/about.jade',
'sass.html': 'jade/sass.jade',
'getting-started.html': 'jade/getting-started.jade',
'mobile.html': 'jade/mobile.jade',
'showcase.html': 'jade/showcase.jade',
'parallax.html': 'jade/parallax.jade',
'parallax-demo.html': 'jade/parallax-demo.jade',
'typography.html': 'jade/typography.jade',
'color.html': 'jade/color.jade',
'shadow.html': 'jade/shadow.jade',
'grid.html': 'jade/grid.jade',
'media-css.html': 'jade/media-css.jade',
'table.html': 'jade/table.jade',
'helpers.html': 'jade/helpers.jade',
'buttons.html': 'jade/buttons.jade',
'navbar.html': 'jade/navbar.jade',
'cards.html': 'jade/cards.jade',
'preloader.html': 'jade/preloader.jade',
'collections.html': 'jade/collections.jade',
'badges.html': 'jade/badges.jade',
'footer.html': 'jade/footer.jade',
'modals.html': 'jade/modals.jade',
'dropdown.html': 'jade/dropdown.jade',
'tabs.html': 'jade/tabs.jade',
'toasts.html': 'jade/toasts.jade',
'tooltips.html': 'jade/tooltips.jade',
'sidenav.html': 'jade/sidenav.jade',
'pushpin.html': 'jade/pushpin.jade',
'waves.html': 'jade/waves.jade',
'media.html': 'jade/media.jade',
'collapsible.html': 'jade/collapsible.jade',
'scrollspy.html': 'jade/scrollspy.jade',
'fullscreen-slider-demo.html': 'jade/fullscreen-slider-demo.jade',
'pagination.html': 'jade/pagination.jade',
'breadcrumbs.html': 'jade/breadcrumbs.jade',
'carousel.html': 'jade/carousel.jade',
'feature-discovery.html': 'jade/feature-discovery.jade',
'pulse.html': 'jade/pulse.jade',
'pushpin-demo.html': 'jade/pushpin-demo.jade',
'css-transitions.html': 'jade/css-transitions.jade',
'themes.html': 'jade/themes.jade',
'404.html': 'jade/404.jade',
'autocomplete.html': 'jade/autocomplete.jade',
'checkboxes.html': 'jade/checkboxes.jade',
'chips.html': 'jade/chips.jade',
'pickers.html': 'jade/pickers.jade',
'radio-buttons.html': 'jade/radio-buttons.jade',
'range.html': 'jade/range.jade',
'select.html': 'jade/select.jade',
'switches.html': 'jade/switches.jade',
'text-inputs.html': 'jade/text-inputs.jade',
'support-us.html': 'jade/support-us.jade',
'floating-action-button.html': 'jade/floating-action-button.jade',
'auto-init.html': 'jade/auto-init.jade'
'docs/index.html': 'jade/index.jade',
'docs/icons.html': 'jade/icons.jade',
'docs/about.html': 'jade/about.jade',
'docs/sass.html': 'jade/sass.jade',
'docs/getting-started.html': 'jade/getting-started.jade',
'docs/mobile.html': 'jade/mobile.jade',
'docs/parallax.html': 'jade/parallax.jade',
'docs/parallax-demo.html': 'jade/parallax-demo.jade',
'docs/typography.html': 'jade/typography.jade',
'docs/color.html': 'jade/color.jade',
'docs/shadow.html': 'jade/shadow.jade',
'docs/grid.html': 'jade/grid.jade',
'docs/media-css.html': 'jade/media-css.jade',
'docs/table.html': 'jade/table.jade',
'docs/helpers.html': 'jade/helpers.jade',
'docs/buttons.html': 'jade/buttons.jade',
'docs/navbar.html': 'jade/navbar.jade',
'docs/cards.html': 'jade/cards.jade',
'docs/preloader.html': 'jade/preloader.jade',
'docs/collections.html': 'jade/collections.jade',
'docs/badges.html': 'jade/badges.jade',
'docs/footer.html': 'jade/footer.jade',
'docs/modals.html': 'jade/modals.jade',
'docs/dropdown.html': 'jade/dropdown.jade',
'docs/tabs.html': 'jade/tabs.jade',
'docs/toasts.html': 'jade/toasts.jade',
'docs/tooltips.html': 'jade/tooltips.jade',
'docs/sidenav.html': 'jade/sidenav.jade',
'docs/pushpin.html': 'jade/pushpin.jade',
'docs/waves.html': 'jade/waves.jade',
'docs/media.html': 'jade/media.jade',
'docs/collapsible.html': 'jade/collapsible.jade',
'docs/scrollspy.html': 'jade/scrollspy.jade',
'docs/fullscreen-slider-demo.html': 'jade/fullscreen-slider-demo.jade',
'docs/pagination.html': 'jade/pagination.jade',
'docs/breadcrumbs.html': 'jade/breadcrumbs.jade',
'docs/carousel.html': 'jade/carousel.jade',
'docs/feature-discovery.html': 'jade/feature-discovery.jade',
'docs/pulse.html': 'jade/pulse.jade',
'docs/pushpin-demo.html': 'jade/pushpin-demo.jade',
'docs/css-transitions.html': 'jade/css-transitions.jade',
'docs/404.html': 'jade/404.jade',
'docs/autocomplete.html': 'jade/autocomplete.jade',
'docs/checkboxes.html': 'jade/checkboxes.jade',
'docs/chips.html': 'jade/chips.jade',
'docs/pickers.html': 'jade/pickers.jade',
'docs/radio-buttons.html': 'jade/radio-buttons.jade',
'docs/range.html': 'jade/range.jade',
'docs/select.html': 'jade/select.jade',
'docs/switches.html': 'jade/switches.jade',
'docs/text-inputs.html': 'jade/text-inputs.jade',
'docs/floating-action-button.html': 'jade/floating-action-button.jade',
'docs/auto-init.html': 'jade/auto-init.jade'
}
}
},
Expand Down Expand Up @@ -577,6 +574,16 @@ module.exports = function(grunt) {
to: '"version": "' + grunt.option('newver')
}
]
},
docs: {
src: ['.gitignore'],
overwrite: true,
replacements: [
{
from: '/docs/*.html',
to: ''
}
]
}
},

Expand All @@ -588,7 +595,7 @@ module.exports = function(grunt) {
banner:
'/*!\n * Materialize v' +
grunt.option('newver') +
' (http://materializecss.com)\n * Copyright 2014-2017 Materialize\n * MIT License (https://raw.githubusercontent.com/materializecss/materialize/master/LICENSE)\n */',
' (http://materializecss.com)\n * Copyright 2014-2021 Materialize\n * MIT License (https://raw.githubusercontent.com/materializecss/materialize/master/LICENSE)\n */',
linebreak: true
},
files: {
Expand Down Expand Up @@ -632,6 +639,12 @@ module.exports = function(grunt) {
}
}
}
},

copy: {
docs: {
src: 'bin/materialize.js', dest: 'docs/js/materialize.js'
}
}

};
Expand All @@ -657,6 +670,7 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-postcss');
grunt.loadNpmTasks('grunt-babel');
grunt.loadNpmTasks('grunt-contrib-connect');
grunt.loadNpmTasks('grunt-contrib-copy');

// define the tasks
grunt.registerTask('release', [
Expand Down Expand Up @@ -707,4 +721,5 @@ module.exports = function(grunt) {
grunt.task.run(tasks);

});
grunt.registerTask('docs', ['js_compile', 'copy:docs', 'sass:gh', 'postcss:gh', 'jade', 'replace:docs']);
};
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@
<a href="https://materializecss.com/"><strong>-- Browse the docs --</strong></a>
<br>
<br>
<a href="https://travis-ci.com/materializecss/materialize">
<img src="https://travis-ci.com/materializecss/materialize.svg?branch=v1-dev" alt="Travis CI badge">
<a href="https://github.com/materializecss/materialize/actions/">
<img src="https://github.com/materializecss/materialize/actions/workflows/nightly.yml/badge.svg" alt="GitHub Actions badge">
</a>
<a href="https://badge.fury.io/js/materialize-css">
<img src="https://badge.fury.io/js/materialize-css.svg" alt="npm version badge">
<a href="https://www.npmjs.com/package/@materializecss/materialize">
<img src="https://badge.fury.io/js/%40materializecss%2Fmaterialize.svg" alt="npm version badge">
</a>
<a href="https://cdnjs.com/libraries/materialize">
<img src="https://img.shields.io/cdnjs/v/materialize.svg" alt="CDNJS version badge">
<a href="https://www.jsdelivr.com/package/npm/@materializecss/materialize">
<img src="https://data.jsdelivr.com/v1/package/npm/@materializecss/materialize/badge" alt="jsDelivr version badge">
</a>
<a href="https://david-dm.org/materializecss/materialize">
<img src="https://david-dm.org/materializecss/materialize/status.svg" alt="dependencies Status badge">
Expand Down Expand Up @@ -94,4 +94,4 @@ We use Jasmine as our testing framework and we're trying to write a robust test
Check out the [CONTRIBUTING document](CONTRIBUTING.md) in the root of the repository to learn how you can contribute. You can also browse the [help-wanted](https://github.com/materializecss/materialize/labels/help-wanted) tag in our issue tracker to find things to do.

## Copyright and license
Code Copyright 2018 Materialize. Code released under the MIT license.
Code Copyright 2021 Materialize. Code released under the MIT license.
7 changes: 7 additions & 0 deletions docs/css/ghpages-materialize.css

Large diffs are not rendered by default.

File renamed without changes.
2 changes: 1 addition & 1 deletion fab-toolbar-demo.html → docs/fab-toolbar-demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
<script>if (!window.jQuery) { document.write('<script src="bin/jquery-2.1.1.min.js"><\/script>'); }
</script>
<script src="bin/materialize.js"></script>
<script src="docs/js/init.js"></script>
<script src="js/init.js"></script>

</body>
</html>
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
25 changes: 0 additions & 25 deletions docs/js/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,31 +66,6 @@
}
}, 100);

// BuySellAds Detection
// var $bsa = $('.buysellads'),
// $timesToCheck = 3;
// function checkForChanges() {
// if (!$bsa.find('#carbonads').length) {
// $timesToCheck -= 1;
// if ($timesToCheck >= 0) {
// setTimeout(checkForChanges, 500);
// } else {
// var donateAd = $(
// '<div id="carbonads"><span><a class="carbon-text" href="#!" onclick="document.getElementById(\'paypal-donate\').submit();"><img src="images/donate.png" /> Help support us by turning off adblock. If you still prefer to keep adblock on for this page but still want to support us, feel free to donate. Any little bit helps.</a></form></span></div>'
// );

// $bsa.append(donateAd);
// }
// }
// }
// checkForChanges();

// BuySellAds Demos close button.
$('.buysellads.buysellads-demo .close').on('click', function() {
$(this)
.parent()
.remove();
});

// Github Latest Commit
if ($('.github-commit').length) {
Expand Down
Loading