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 1 commit
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'

6 changes: 1 addition & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,9 @@ 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
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
124 changes: 66 additions & 58 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -393,62 +393,62 @@ 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/showcase.html': 'jade/showcase.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/themes.html': 'jade/themes.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/support-us.html': 'jade/support-us.jade',
'docs/floating-action-button.html': 'jade/floating-action-button.jade',
'docs/auto-init.html': 'jade/auto-init.jade'
}
}
},
Expand Down Expand Up @@ -588,7 +588,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 +632,12 @@ module.exports = function(grunt) {
}
}
}
},

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

};
Expand All @@ -657,6 +663,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 All @@ -677,7 +684,8 @@ module.exports = function(grunt) {
'replace:package_json',
'rename:rename_src',
'rename:rename_compiled',
'clean:temp'
'clean:temp',
'copy:docs'
]);

grunt.task.registerTask('configureBabel', 'configures babel options', function() {
Expand Down
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
File renamed without changes.
File renamed without changes
File renamed without changes
2 changes: 1 addition & 1 deletion jade/_footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ <h5>Join the Discussion</h5>
</div>
<div class="col l4 s12" style="overflow: hidden;">
<h5>Connect</h5>
<iframe src="https://ghbtns.com/github-btn.html?user=dogfalo&repo=materialize&type=watch&count=true&size=large" allowtransparency="true" frameborder="0" scrolling="0" width="170" height="30"></iframe>
<iframe src="https://ghbtns.com/github-btn.html?user=materializecss&repo=materialize&type=watch&count=true&size=large" allowtransparency="true" frameborder="0" scrolling="0" width="170" height="30"></iframe>
<br>
<a href="https://twitter.com/MaterializeCSS" class="twitter-follow-button" data-show-count="true" data-size="large" data-dnt="true">Follow @MaterializeCSS</a>
</div>
Expand Down
12 changes: 6 additions & 6 deletions jade/_scripts.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
<script>if (!window.jQuery) { document.write('<script src="bin/jquery-3.2.1.min.js"><\/script>'); }
</script>
<script src="docs/js/jquery.timeago.min.js"></script>
<script src="docs/js/prism.js"></script>
<script src="docs/js/lunr.min.js"></script>
<script src="docs/js/search.js"></script>
<script src="bin/materialize.js"></script>
<script src="docs/js/init.js"></script>
<script src="js/jquery.timeago.min.js"></script>
<script src="js/prism.js"></script>
<script src="js/lunr.min.js"></script>
<script src="js/search.js"></script>
<script src="js/materialize.js"></script>
<script src="js/init.js"></script>
<!-- Twitter Button -->
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>

Expand Down
Loading